NRPE caps scan fails on WARN/CRIT (1/2) response code (instead of just UNKNOWN/3+)
Description
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Show:
Seth Leger August 18, 2014 at 2:33 PM
No feedback from reporter so assuming it was fixed like bug .
Alejandro Galue August 10, 2011 at 11:46 AM
Is this the same issue as ?
Could you check the latest code ? I'm asking because your change doesn't appear to apply to the current code (for 1.8 or 1.10)
Really simple....
NRPE caps plugin should only fail detection on a check if the return is UNKNOWN – i.e. a response of 1/WARN or 2/CRIT is still plenty valid...it means the check exists in the NRPE config and was executed.
If a check is configured in nrpe.conf but invalid on a particular node, it is up to the check to return the proper code. This is pretty easy in practice...last line of anyone's NRPE check should be the equivalent of exit(3)
SO....really simple patch:
line 164 of opennms-services/src/main/java/org/opennms/netmgt/capsd/plugins/NrpePlugin.java
s/false/true/
done!
thanks