Check_disk withpartition check

hello
i have problem checking var partion with check_disk plugin
what i did is
in my nrpe.cfg i defined this command
command[check_diskvar]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -m /var

when i run this command from remote host i get proper output as follows
root@host [/usr/local/nagios/libexec]# ./check_disk -w 20 -c 10 -m /var
DISK OK - free space: /var 2440 MB (41%);| /var=3467MB;5886;5896;0;5906

now when i give this command in myservices.cfg as follows

#check_disk service definition
define service {
host_name remotehost address
service_description /VAR
check_command check_nrpe!check_diskvar
use generic-service
}

i get err as follows
NRPE: Command ‘check_diskvar’ not defined
what should be done.
where m i going wrong :frowning:

Have you restarted the nrpe daemon on the remote host? You have to do this each time you make changes to the nrpe.cfg

Hi
yes i tried restarting the daemon but no luch still getting the same err NRPE: Command ‘check_diskvar’ not defined
i think i am missiong out smethng.
how do i have to define the cmmd wht i have done is it right?
Thanks

how is check_nrpe defined in your check_commands.cfg?

#check nrpe command definition
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1
}

Also when i give this cmmd from my remote host it gives me correct output

root@host [/usr/local/nagios/libexec]# ./check_disk -w 20 -c 10 -m /var
DISK OK - free space: /var 2461 MB (42%);| /var=3446MB;5886;5896;0;5906

That all looks fine. On the remote host do ps-ef |grep nrpe. Kill the nrpe dameon(s). Then restart it. Then retry the check.

Hi redtom
i did that but still the same errors i am getting.
is there anything else you would like to know from me so that ou can help me out
Thanks

Hi redtom
Thanks a lot for your continuous help.
My problem is solved
Thanks again

Will you please tell us how you fixed it. This could help others that may have the same trouble.

Oh
yes sure
on remote host i did changes in nrpe.cfg.
Checked the syntax of check_diskvar.
when evrythng seemed ok killed nrpe and restarted the deamon.

the syantx of check_diskvar should be
command[check_diskvar]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -m /var

Thats it
Thanks