Plugins bombing because $USER1$ variable is null?

I have just installed and configured nagios v. 2.8 with version 1.4.7 plugins.
When nagios runs and starts calling plugins as listed in command.cfg, they bomb. Nagios keeps running.
For example, when nagios attempts to run check_ping it gives the error:

[blockquote][1175634316] Warning: Attempting to execute the command “/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…[/blockquote]

Looking at command.cfg shows the path to the check_ping command as:

[blockquote]$USER1$/check_ping[/blockquote]

So it looks like nagios is returning a null value for the variable $USER1$.
I tested my theory by changing $USER1$ to the full path to the plugins, /usr/local/nagios/libexec and it works fine.

Does anyone know why this variable is not being set, or being set wrong?

When I configured the make file for nagios, I used:
[blockquote]./configure --prefix=/usr/local/nagios --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagios[/blockquote]

For the plugins, I used:
[blockquote]./configure --with-nagios-user=nagios --with-nagios-group=nagios
[/blockquote]

Thanks for any insight you can give.

Don’t know if you have fixed this or not yet,
In your nagios.cfg there should be a resource file section, is the $USER1$ variable defined in the resource file? :frowning:

RESOURCE FILE

This is an optional resource file that contains $USERx$ macro

definitions. Multiple resource files can be specified by using

multiple resource_file definitions. The CGIs will not attempt to

read the contents of resource files, so information that is

considered to be sensitive (usernames, passwords, etc) can be

defined as macros in this file and restrictive permissions (600)

can be placed on this file.

resource_file=/etc/nagios/resource.cfg

make sure your plugins are in the proper directory. the $USER1$ variable actually is a placeholder for that default location. It looks like your are using the right directory when you substitute though, so that is a very interesting predicament. The resource file should also help you out.