check_by_ssh-issue(remote host monitoring)

vivek sharma sharma vivek_222 at rediffmail.com
Sun Apr 10 20:21:42 CEST 2005


Dear all,
	I guess there is no solution for getting Nagios work in betn. two OS as I have not got any reply in 3 days.
Well I have tried to work out one solution,its through check_by_ssh plugin wherein i am trying to run the commands through it 
in the remote system(Solaris-OS) and give me the output in Nagios(Nagios-OS).But the problem That i am getting is that i am 
getting proper output when i run the command on command line as Nagios user but when i restart the Nagios service and see it
in GUI it basically gives me only first line of output.Same behaviour happens in the command line also if i remove the -O
option but after giving that it works fine in command line but no improvement in GUI mode .
My configuration is as follows:

define command {
                command_name solaris_disk_check
                command_line $USER1$/check_by_ssh -H xxx.xxx.xxx -l root -C 'df -k' -n solaris-disk-check -s solaris-disk-check -O $USER1$/test
}

Command line output:
[nagios at nagios libexec]$ id
uid=501(nagios) gid=501(nagios) groups=501(nagios),502(nagcmd)
[nagios at nagios libexec]$ /usr/local/nagios/libexec/check_by_ssh -H xxx.xxx.xxx -l root -C 'df -k' -n solaris-disk-check -s 
solaris-check-disk -O /usr/local/nagios/libexec/test
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d10      5040814 4140918  849488    83%    /
/proc                      0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
fd                         0       0       0     0%    /dev/fd
/dev/md/dsk/d30      4032504 3450385  541794    87%    /var
swap                 2248192     168 2248024     1%    /var/run
swap                 2254928    6904 2248024     1%    /tmp
/dev/md/dsk/d50      1984564 1660404  264624    87%    /export
/dev/md/dsk/d40      1488787  111161 1318075     8%    /opt
[nagios at nagios libexec]$

GUI Output:
Filesystem kbytes used avail capacity Mounted on 

Both check_by_ssh plugin and test file are in /usr/local/nagios/libexec=$USER1$ directory

Also how would i make the nagios get a warning status for %age amount of disk free etc. b'cos check_by_ssh plugin has option
for warning/critical only on response time which is not useful for my situation.

Plz suggest.

Thanks.
Vivek.
 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050410/ddae4918/attachment.html>


More information about the Users mailing list