check_by_ssh out of bounds

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
iivanyi
Posts: 26
Joined: Tue Jul 03, 2012 3:21 am

check_by_ssh out of bounds

Post by iivanyi »

Hello,

I've run out of options, so I'm wondering what/where I've gone wrong. I've setup a linux host for check_by_ssh in XI. This works fine.

I have also setup 2 Solaris hosts in the same way.

Example:
###############################################################################

define service {
<snip>
check_command check_xi_by_ssh!'check_init_service cron'!!!!!!!
</snip>
###############################################################################

This is exactly the same for the Linux system.

Unfortunately all service checks are returning "out of bounds within the gui.

via command line as user Nagios this runs fine:

$ /usr/local/nagios/libexec/check_by_ssh -E -t 60 -H REMOTEHOST -C 'check_init_service cron'
online Oct_22 svc:/system/cron:default


I can login remotely without password obviously...


Note, the remote user, on all systems is using restricted bash, I don't think this is the issue as the checks are running from command line
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_by_ssh out of bounds

Post by lmiltchev »

Run the following command on the remote box and show us the output:

Code: Select all

grep nag /etc/group
Be sure to check out our Knowledgebase for helpful articles and solutions!
iivanyi
Posts: 26
Joined: Tue Jul 03, 2012 3:21 am

Re: check_by_ssh out of bounds

Post by iivanyi »

/etc/group

anothergroup::1035:nagios,anotheruser
nagios::50110:

/etc/passwd

nagios:x:50110:50110:Nagios Monitoring System:/home/nagios:/bin/rbash


nagios:nagios is connecting to remote system as user nagios for clarification
iivanyi
Posts: 26
Joined: Tue Jul 03, 2012 3:21 am

Re: check_by_ssh out of bounds

Post by iivanyi »

note also this is the current check_xi_by_ssh command config

$USER1$/check_by_ssh -E -t 60 -H $HOSTADDRESS$ -C $ARG1$
iivanyi
Posts: 26
Joined: Tue Jul 03, 2012 3:21 am

Re: check_by_ssh out of bounds

Post by iivanyi »

the following is returning ok in web ui,

check_command check_xi_by_ssh!'echo OK'!!!!!!!


so I am still at a loss to see where I can see an error/return code isn't functionning properly, I did add -v check_by_ssh command

this reported the command-line in web ui against the Linux host, but still out of bounds against solaris host
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_by_ssh out of bounds

Post by lmiltchev »

It sounds like a permissions issue... Is "check_init_service" the only check that you are having issues with on the Solaris box? Can you run other nagios checks, for example:

Code: Select all

$ /usr/local/nagios/libexec/check_by_ssh -E -t 60 -H REMOTEHOST -C '/opt/nagios/libexec/check_users -w 2 -c 5'
Note: Your path may be different.
Be sure to check out our Knowledgebase for helpful articles and solutions!
iivanyi
Posts: 26
Joined: Tue Jul 03, 2012 3:21 am

Re: check_by_ssh out of bounds

Post by iivanyi »

no all checks work from command-line


[nagios@nagiosserver ~]$ /usr/local/nagios/libexec/check_by_ssh -v -q -E -t 60 -H solarishost "check_swap -w 30% -c 20%"
/usr/bin/ssh -q solarishost 'check_swap -w 30% -c 20%'
SWAP OK - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0


service definition:
check_command check_xi_by_ssh!'check_swap -w 90% -c 80%'!!!!!!!


All work for the Linux hosts, none except "echo" work for the Solaris systems.
I even tried check_dummy, which was also reportin out of bounds
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_by_ssh out of bounds

Post by lmiltchev »

All work for the Linux hosts, none except "echo" work for the Solaris systems.
My understanding was that the following command, run in the CLI:

Code: Select all

$ /usr/local/nagios/libexec/check_by_ssh -E -t 60 -H REMOTEHOST -C 'check_init_service cron'
worked fine for you, when you run it against the Solaris host, but it showed "out of bounds" in the GUI...

Can you run the command locally on the Solaris box as the nagios user, and show us the output?
Be sure to check out our Knowledgebase for helpful articles and solutions!
iivanyi
Posts: 26
Joined: Tue Jul 03, 2012 3:21 am

Re: check_by_ssh out of bounds

Post by iivanyi »

:/home/nagios $ check_disk -w 30% -c 20% -A
DISK OK - free space: / 5775 MB

:/home/nagios $ check_procs
PROCS OK: 73 processes | procs=73;;;0;

etc...

I'd say something in profile not being read but I'm having trouble seeing why it would work via command-line check-by-ssh
iivanyi
Posts: 26
Joined: Tue Jul 03, 2012 3:21 am

Re: check_by_ssh out of bounds

Post by iivanyi »

some more background perhaps,

I have 2 solaris packages, one containing the plugins (checks) which based on architecture will create a symbolic link between i386 or sparc directory -> libexec
and one package that creates the intended user (no difference between platform)

I've extended my testing a bit and x86 is working with no issues. And yet another SPARC is failing.

binaries, and scripts work on SPARC with NRPE without any issues, however we need to use ssh on a small subset.
Locked