Different results from command line and check_nrpe


This is REALLY wierd. I have a script/plugin that checks for the existence of a file. It reports the correct results on the command line of the client system.

However, when I run check_nrpe command on the nagios server it gives me a different result.

client system: CRITICAL: /home/admin/hotmail_limit_reached exists !

nagios server: OK: /home/admin/hotmail_limit_reached does not exist !

Any help or suggestions much appreciated!!




usually, this kind of problems come from the fact that, when nrpe executes a plugin, it has none of your env. variables.

This means that all your relative paths (ie: …/my_dir) won’t work.
All your $HOME or else variables may not work either (except if you have them in the .profile of your nrpe user).

Anyway, have a look with this in mind.
If you can’t find such errors, don’t hesitate to post your script; we may help you further with that info ^^


Thanks Loose, that was it.

Once I got the environment correct all fell into place.

Thanks again

KH !lol