Check_Files

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
petrocelli
Posts: 1
Joined: Tue Aug 29, 2017 4:39 pm

Check_Files

Post by petrocelli »

Hi All 'I really would appreciate a bit of help. I am finding information but none seems to work for me. I am using Nagios Core 4 to monitor some Windows Machines. THey have nsclient++ 0.5.0.62 installed. All my checks work except checking the size of a file. Here is my config below.

#Commands.cfg
define command {
command_name Check_Test
command_line $USER1$/check_nrpe3 -H $HOSTADDRESS$ -p 5666 -c check_files -n MinWarn=$ARG2$ MinCrit=$ARG1$ -a File="c://test//test.txt"
}

#Windows.cfg
define service {
use generic-service
host_name server_name
service_description Test.txt Filesize
check_command Check_Test!1K!2K
}

I am getting the error CHECK_NRPE: Invalid packet type received from server. Could anyone please help me figure out what I am doing wrong?

Regards
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Check_Files

Post by mcapra »

Try the fix mentioned in the "Increasing NSClient++ Payload Length" section of this document:
https://support.nagios.com/kb/article/n ... ained.html

Alternatively, you could just use check_nrpe v2.
Former Nagios employee
https://www.mcapra.com/
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Check_Files

Post by dwhitfield »

Thanks @mcapra!

If Matt's suggestion doesn't work for you, can you upload your NSClient.ini? Also, I will note that we don't officially support the .5 series of NSClient (although it should largely work, as you know.)
Locked