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
Return file count
Re: Return file count
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
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?
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
That means you're running an old version of NSClient++, you can find the latest here:
https://nsclient.org/download/
https://nsclient.org/download/
Correct, you're running NSClient++ version 0.3.8.76 (0.5.2.35 is the latest).I (0.3.8.76 2010-05-27) seem to be doing fine...
-
RebeccaIlene
- Posts: 164
- Joined: Tue Apr 02, 2019 8:38 pm
Re: Return file count
Thanks.
You can close this case.
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
Closing caseRebeccaIlene wrote:Thanks.
You can close this case.