I did that you requested and I'm getting argument, as you can see belowtgriep wrote:The valid nrpe config file is this file /usr/local/nagios/etc/nrpe.cfg .
If you want to use arguments in your commands, you have to edit the commands so they will use the arguments that the Nagios server will pass to the NRPE Agent.
To do that, edit /usr/local/nagios/etc/nrpe.cfg file on the remote server and change the command fromtoCode: Select all
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/sda5
Save the file and restart the nrpe agent.Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
Without knowing exactly how you defined the check_nrpe command on the Nagios Server, you would have to change your command fromtoCode: Select all
check_command check_nrpe!check_disk!10%5% -p /dev/sda5
Save the file and restart nagios and see if the check returns the correct information for the /dev/sda5 partition.Code: Select all
check_command check_nrpe!check_disk!10% 5% /dev/sda5
I looked for nrpe.cfg on nagios server but I only find nrpe.cfg on the following location:
/etc/nagios/nrpe.cfg
with the following content about commands
command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200
Thanks again for your help
Best regards