Nagios 2.03b, plugins 1.4 - no status changes

Marc Powell marc at ena.com
Thu Apr 21 22:29:47 CEST 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of bru1n at comcast.net
> Sent: Thursday, April 21, 2005 2:54 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Nagios 2.03b, plugins 1.4 - no status changes
> 
> Greetings nagios gurii,
> 
> I have a single remote service configured, and it works from the
command
> line. I use check_by_ssh configured with ~/.ssh/authorized_keys. I am
> specifically forcing the plugin to return a warning|critical.
> 
> $ id
> uid=1003(nagios) gid=101(nagios)
> $ uname -a
> SunOS monitor 5.10 Generic sun4u sparc SUNW,Sun-Fire-V210
> $ pwd
> /usr/local/nagios/libexec
>  ./check_by_ssh -H target -s 18 -C
"/usr/local/nagios/libexec/check_disk -
> w 99% -c 90% -p /tmp"
> DISK WARNING - free space: /tmp 6763 MB (93%);|
/tmp=521MB;72;728;0;7283
> 
> From the target:
> root at target: df -k /tmp
> Filesystem            kbytes    used   avail capacity  Mounted on
> swap                 7458984  533232 6925752     8%    /tmp
> 
> So it works from the shell, and it works according to the monitor;
> "service detail" view. The result from above is exactly what I see in
the
> "Status Information" column next to host "tradev".
> 
> The problem:
> In the "Status" column, I see "OK" in green. Obviously not what I'd
> expect.

I don't have a suggestion for you but to gather more information, what
does the shell show as the exit code after running your check_by_ssh
command above? 

bash-2.05a$ ./check_by_ssh -H myhost -s 18 -C
"/usr/local/nagios/libexec/check_disk -w 99% -c 90% -p /tmp"
DISK CRITICAL - [606792 kB (61%) free on /dev/md0]
bash-2.05a$ echo $?
2

In your case, the exit code for WARNING is 1, not 2. Nagios uses the
exit code, not the plugin output, to determine service state. If that
exit code is not correct then the state will be wrong.

--
Marc


-------------------------------------------------------
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_ide95&alloc_id396&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