check_by_ssh-issue(remote host monitoring)

Andreas Ericsson ae at op5.se
Sun Apr 10 21:00:46 CEST 2005


Please use an email-client that wraps long lines. It's nicer on the eyes 
for those poor bastards that receive it.


vivek sharma sharma wrote:
> 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.

This is the intended behaviour and properly documented. Do your homework.

>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.
> 

Run a script on the remote host via check_by_ssh, or better still, a 
compiled nagios-plugin. It's what everybody else does, and what every 
FAQ, tutorial and other piece of documentation suggests you do.

> Thanks. Vivek.
> 
> 
> 
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list