Plugin shows WARNING when it's CRITICAL


#1

I have a nagios plugin that checks root partition disk usage.

It’s used like this:

It seems to work fine on the command line, and returns exit code 2 when disk usage is critical. However, I notice that Nagios itself is only flagging it as WARNING when the disk usage is at or over 95%. Why would it be doing that?

Doug


#2

Did you run the command as nagios user? Then, right after running the command, do “echo $?”, to see the exit status code.

I can also think about quoting or environment issues when defining the command in the .cfg file.