I inherited a nagios install so I’m new to it but have found it to be pretty straightforward to setup and get working. I’m attempting to move to a new server with the latest greatest version of nagios on it (running on RedHat Linux). I have absolutely everything working EXCEPT check_ping - the interface shows UNKNOWN status regardless of what I do (Status Information has: check_ping: %s: Warning threshold must be integer or percentage! ). However when I do a “ps” and capture the command that is running and run it by hand from the command line, it runs fine and returns “PING OK”. Here is the command and result (ip masked):
ping may require some extra permissions… so possibly when the nagios user runs without a console some sudo stuff isn’t running correctly? not even sure if this can happen…
did you get any warnings while compiling the plugins?
No errors whatsoever on compile. I’ve even recompiled just to make sure. Not sure why ping would require permissions that other commands don’t, but assuming you are correct what is the remedy? Everything is owned by nagios.
Nothing that I’ve found. I’ve turned up debugging and haven’t seen anything in any log - direct nagios logs or anything in /var/log. Even compiled check_ping with debug set. Nothing that I can find other than the message posted previously.
I’ll be glad to send anything config/log related, just let me know what you need and I’ll post it.
I can’t find or remeber such a command definition in any of my files, where does this come from? is the file even used by nagios.cfg?
but that would create other sorts of problems…
an idea to see if it’s something with permissions…
create a small shell script which just runs some pings (no nagios involved) and have the output sent to a file.
put it in crontab and see th eresults when run as root or nagios user…