Issues getting check_file_age to work using nrpe

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
mrfisher
Posts: 2
Joined: Tue Jul 14, 2020 7:45 pm

Issues getting check_file_age to work using nrpe

Post 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!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issues getting check_file_age to work using nrpe

Post by scottwilkerson »

What are the permissions here

Code: Select all

ls -l /resources/file
ls -l /resources
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mrfisher
Posts: 2
Joined: Tue Jul 14, 2020 7:45 pm

Re: Issues getting check_file_age to work using nrpe

Post by mrfisher »

Permissions were all fine. I got it working by disabling selinux.

Thanks!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issues getting check_file_age to work using nrpe

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked