Page 1 of 1

Issues getting check_file_age to work using nrpe

Posted: Tue Jul 14, 2020 8:55 pm
by mrfisher
Hi together,

I'm having issues getting a check_file_age check working using nrpe.

/etc/nagios/nrpe.conf

Code: Select all

command[check_file_age]=/usr/lib64/nagios/plugins/check_file_age -w 60 -c 300 -f /resources/file
When I run the below command on my machine I get a `NRPE: Unable to read output` error

Code: Select all

[root@localhost]#/usr/lib64/nagios/plugins/check_nrpe -H 127.0.0.1 -c check_file_age
If I don't use check_nrpe and instead run the plugin directly it works fine:

Code: Select all

[root@localhost]#/usr/lib64/nagios/plugins/check_file_age -w 60 -c 300 -f /resources/file
FILE_AGE CRITICAL: /resources/file is 7533 seconds old and 3 bytes  | age=7533s;60;300 size=3B;0;0;0
Anyone able to point me into the right direction?
Thanks in advance!

Re: Issues getting check_file_age to work using nrpe

Posted: Wed Jul 15, 2020 7:31 am
by scottwilkerson
What are the permissions here

Code: Select all

ls -l /resources/file
ls -l /resources

Re: Issues getting check_file_age to work using nrpe

Posted: Wed Jul 15, 2020 8:39 pm
by mrfisher
Permissions were all fine. I got it working by disabling selinux.

Thanks!

Re: Issues getting check_file_age to work using nrpe

Posted: Thu Jul 16, 2020 7:08 am
by scottwilkerson
mrfisher wrote:Permissions were all fine. I got it working by disabling selinux.

Thanks!
Great!

Glad to hear it is working

Locking thread