I have problem when use the following:
from nagios server:
./check_nrpe -H <Host> -c check_file_age
the output is "NRPE: Command 'check_file_age' not defined"
while when executing the command from the host:
/usr/lib/nagios/plugins/check_file_age -w 21600 -c 21601 -f <file>
the output is "OK", which means that check_file_age is working fine on the host.
check_file_age is not working with check_nrpe
Re: check_file_age is not working with check_nrpe
Hi fsodah,
The command "check_file_age" must be defined on the <HOST> (nrpe) server for this to works.
Please add the following lines to "/usr/local/nagios/etc/nrpe/common.cfg":
While you have the configuration file open, make sure you have command arguments enabled:
Once added, please restart nrpe service:
You can test the command on your Nagios XI as:
Best Regards,
Vinh
The command "check_file_age" must be defined on the <HOST> (nrpe) server for this to works.
Please add the following lines to "/usr/local/nagios/etc/nrpe/common.cfg":
Code: Select all
### CHECK FILE AGE ###
command[check_file_age]=/usr/local/nagios/libexec/check_file_age $ARG1$
Code: Select all
dont_blame_nrpe=1
Code: Select all
systemctl restart nrpe.serviceCode: Select all
./check_nrpe -H <HOST> -c check_file_age -a '-w 21600 -c 21601 -f <FILENAME>'Best Regards,
Vinh
Re: check_file_age is not working with check_nrpe
after following your steps it worked fine.
tanks you.
tanks you.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_file_age is not working with check_nrpe
Great!fsodah wrote:after following your steps it worked fine.
tanks you.
Locking thread