Nagios FAQ: I'm trying to get Nagios to work, but when it starts running there is an error message in the log file that says something like "Nagios, Error Code 127, Make sure the plugin you're trying to run actually exists". How I can fix this?
Code 127 means "command not found" (see this link), so the thing you need to do is manually log in as the Nagios user on your system and see if you can run the desired command from the command line yourself. Odds are that the Nagios bin directory isn't in your PATH.
Specifically, what I mean is from the Unix/Linux command line do something like this:
prompt> su - nagios (then enter the nagios user password) prompt> check_ping
If you get a "command not found" error after trying to run the
check_ping command, you have one of two problems: the plugins aren't really installed, or more likely, the directory that contains the
check_ping command is not in the PATH of the
To fix this problem, just edit the PATH in the right file (.bashrc, .bash_profile, or .profile) on your Unix/Linux system to add the
libexec directory to your path, and I think your Nagios errors will go away. (FWIW, on my current Linux system the full path to this directory is