Page 1 of 1

Nagios nrpe.cfg running a python command issues

Posted: Thu Dec 01, 2011 10:45 am
by gpimp666
I set up a service and command in nagios run the mrpe client and execute a python script.

Inside of nrpe.cfg why does the following command work: "command[check_perforce_disk_usage]=/usr/local/nagios/libexec-custom/Check_Disk_Usage.py %--warning=$ARG1$% %--critical=$ARG2$% %--include=$ARG3$%" with "%" around the pythons arguments work ? Previously I was having issues with the command when not "%" were added to the command line arguments as follows: "command[check_perforce_disk_usage]=/usr/local/nagios/libexec-custom/Check_Disk_Usage.py --warning=$ARG1$ --critical=$ARG2$ --include=$ARG3$" . I think that maybe nagios needs "%" to parse the nrpe.cfg arguments correctly?

I basically guessed and I found the solution. Any help to why this solution works will be much appreciated ;)