Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
I have a plugin in nagios "check_icmp" who return 4 values if the command can ping the demanded host however i got only 1 values if the ping failed so i used the following command :
Piping into sed is going to overwrite the exit code that was returned by the check_icmp plugin. You're seeing "OK" because your final sed command in the chain is returning 0 for the exit code. Your Bash logic should include something to make sure the exit code of your check_icmp call is preserved through the entire execution and represents the final exit code.