Page 1 of 1

Check_Files

Posted: Tue Aug 29, 2017 5:05 pm
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

Re: Check_Files

Posted: Wed Aug 30, 2017 9:39 am
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.

Re: Check_Files

Posted: Wed Aug 30, 2017 11:33 am
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.)