Page 1 of 1

Return file count

Posted: Thu Oct 01, 2020 9:17 pm
by RebeccaIlene
Hi Team,

We are using CheckFile2 to find the names of the files in a path on a server written less than an hour ago.

However, we are looking to modify the service to return the total file count in the path.

Can you please let me know how this can be modified?

The current command is as below:

/usr/local/nagios/libexec/check_nrpe -2 -H hostname -p 5666 -c CheckFile2 -a truncate=900 "path=D:\Program Files (x86)\Send" "pattern=*.mml" max-dir-depth=0 MaxWarn=20 MaxCrit=40 filter+written=lt:60m

Re: Return file count

Posted: Fri Oct 02, 2020 4:09 pm
by ssax
If you're running a version of NSClient++ that uses CheckFile2 it may not support changing the output, I tested with NSClient++ 3.9 and adding any form of "syntax=blah" doesn't work. You may need to upgrade your nsclient to the latest then it should be able to be modified.

Re: Return file count

Posted: Tue Oct 13, 2020 1:01 am
by RebeccaIlene
When I check the NRPE version I get this output.

I (0.3.8.76 2010-05-27) seem to be doing fine...

Does that mean the version we are using is 0.3?

Where can I get the latest version of NRPE?

Re: Return file count

Posted: Tue Oct 13, 2020 9:38 am
by ssax
That means you're running an old version of NSClient++, you can find the latest here:

https://nsclient.org/download/
I (0.3.8.76 2010-05-27) seem to be doing fine...
Correct, you're running NSClient++ version 0.3.8.76 (0.5.2.35 is the latest).

Re: Return file count

Posted: Wed Oct 28, 2020 4:47 am
by RebeccaIlene
Thanks.

You can close this case.

Re: Return file count

Posted: Wed Oct 28, 2020 7:56 am
by scottwilkerson
RebeccaIlene wrote:Thanks.

You can close this case.
Closing case