[Nagiosplug-devel] [ nagiosplug-Bugs-3306880 ] Negate doesn't seem to do anything
SourceForge.net
noreply at sourceforge.net
Thu Jun 9 15:20:16 CEST 2011
Bugs item #3306880, was opened at 2011-05-24 12:16
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3306880&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: release-1.4.15
>Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: MikeM-2468 (mikem-2468)
Assigned to: Thomas Guyot-Sionnest (dermoth)
Summary: Negate doesn't seem to do anything
Initial Comment:
The negate plugin doesn't seem to work as it should. With or without negate, I get the same results. I used the following command as a test but get the same result with or without using negate.
negate check_ping -H 192.168.100.1 -w 3000.0,80% -c 5000.0,100% -p 5
I've tried v1.4.15 and v1.4.15.-24-g5ebe. Running gcc version 4.3.2 (Debian 4.3.2-1.1) x86.
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2011-06-09 13:20
Message:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2011-05-27 04:03
Message:
Yes, it actually change the nagios status, which is not directly connected
to the output text. Normally the text always match the status, but negate
alters the nagios status only (not the output text).
This is particularly useful when different statuses are handled
differently (ex. email vs pagers). Also usually email subjects use a nagios
macro which returns the correct status text, with the plugin output in the
body.
And as I pointed out, the -s switch (available in recent versions) can be
used to replace the output text as well.
----------------------------------------------------------------------
Comment By: MikeM-2468 (mikem-2468)
Date: 2011-05-26 12:46
Message:
OK. The Manpage seemed to indicate that it would change OK to CRITICAL and
vice versa. I get 0 vs 2 with your example.
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2011-05-26 12:34
Message:
Negate by default only change the return code, which is what matters for
Nagios. try:
check_ping -H 192.168.100.1 -w 3000.0,80% -c 5000.0,100% -p 5; echo $?
vs.
negate check_ping -H 192.168.100.1 -w 3000.0,80% -c 5000.0,100% -p 5; echo
$?
You can also use the -s switch in negate to also change the returned
string, but it'll only work for standard results like "CRITICAL" - ex a
plugin returning "Error" will not be altered besides the return code.
I'm marking the bug as invalid for now, I'll reopen if you can demonstrate
an issue.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3306880&group_id=29880
More information about the Devel
mailing list