Return file count

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RebeccaIlene
Posts: 164
Joined: Tue Apr 02, 2019 8:38 pm

Return file count

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Return file count

Post 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.
RebeccaIlene
Posts: 164
Joined: Tue Apr 02, 2019 8:38 pm

Re: Return file count

Post 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?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Return file count

Post 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).
RebeccaIlene
Posts: 164
Joined: Tue Apr 02, 2019 8:38 pm

Re: Return file count

Post by RebeccaIlene »

Thanks.

You can close this case.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Return file count

Post by scottwilkerson »

RebeccaIlene wrote:Thanks.

You can close this case.
Closing case
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked