nt_count_files Plugin not working

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
ant_wilson16
Posts: 3
Joined: Mon Sep 14, 2015 5:04 am

nt_count_files Plugin not working

Post by ant_wilson16 »

Hi All,

I have recently started to migrate our Nagios core monitoring system to a new server with the latest version. The previous server was setup by my predecessor so I wanted to start again from scratch.

I have everything working, except one of our servers checks for the number of files in a directory. When I have copied the details over this isn't working - and I found it is using a plugin to check for the number of files.

On the server.cfg file, the command it is using is: nt_count_files!C:/\folder/\folder 5 10

On the host machine, there is a C:\nrpe folder, and I have modified the nrpe.cfg file to include the new host IP. I have copied the commands I have found in the commands.cfg file:

define command{
command_name nt_count_files
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c CheckFile3 -a $ARG1$
}


However I am receiving the error: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_nrpe, ...) failed. errno is 2: No such file or directory

I have copied the check_nrpe file from the old server to the new, but I still receive the same error.

Please could someone point me in the right direction as I'm unsure what else to try.

Thanks in advance
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: nt_count_files Plugin not working

Post by hsmith »

Hello,

Did you only copy over the binary for check_nrpe? There are a few things that probably were missed had it been done this way.

Can you try to just /usr/local/nagios/libexec/check_nrpe -H <host> and see if this works for you?

This is a good procedure for installing NRPE. I also recommend this guide wrote by @Box293
Former Nagios Employee.
me.
ant_wilson16
Posts: 3
Joined: Mon Sep 14, 2015 5:04 am

Re: nt_count_files Plugin not working

Post by ant_wilson16 »

Thanks, all working OK now.

Tried the command and it failed due to missing files, so followed the instructions to install nrpe, then had to reconfigure to allow SSL as that was failing.

Checked the nrpe.log file on the host server and it showed "host xx.xx.xx.xx is not allowed to talk to us". Restarted the nrpe service and now working OK.

Thanks for the help.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: nt_count_files Plugin not working

Post by hsmith »

Glad to hear it's working now! Can we mark this one resolved and close it?
Former Nagios Employee.
me.
ant_wilson16
Posts: 3
Joined: Mon Sep 14, 2015 5:04 am

Re: nt_count_files Plugin not working

Post by ant_wilson16 »

Yes this can be closed now.
Thanks again
Locked