Page 2 of 2

Re: Monitoring file count on remote windows machine

Posted: Tue Jul 25, 2017 3:59 pm
by tmattingly
I've tried...
1) check_nrpe -H 192.168.142.1 -t 30 -c check_files -a path='C:\\NO BACKUP' pattern=*.* 'warning=count>500' 'critical=count>1000' top-syntax='${status}: ${problem_count}/${count} files' 'empty-state=ok'
(From the reference link earlier)
If you can help me with simpler tests I'll try those too!

Tom

Re: Monitoring file count on remote windows machine

Posted: Tue Jul 25, 2017 4:08 pm
by tgriep
The command seems to work for me but if you miss one of the single quotes in the command, that would cause the issue you are seeing.

Re: Monitoring file count on remote windows machine

Posted: Tue Jul 25, 2017 4:22 pm
by tmattingly
I was missing the -c parameter. I now get UNKNOWN: No handler for that command

Again, if there are shorter commands we can test with I can certainly plug those in...
(Eventually I'll ask how do you figure out all these parameters???? Wow there is a bunch but worthwhile if we can get it to work!)

Tom

Re: Monitoring file count on remote windows machine

Posted: Tue Jul 25, 2017 4:30 pm
by lmiltchev
The check_files command is not defined in the NSC.ini file you showed us... I am not sure if you are using the same script as me, but I have the following defined in my config under the external scripts section:

Code: Select all

check_files = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs check_files.vbs $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$ $ARG8$ $ARG9$ $ARG10$ $ARG11$ $ARG12$ $ARG13$ $ARG14$
Can you post your script and tell us where it is located?

Re: Monitoring file count on remote windows machine

Posted: Tue Jul 25, 2017 5:10 pm
by tmattingly
I'm sorry I don't understand the question. I was just using the example from earlier in this thread. I don't understand the scripts you are referring to. Was a there a step I missed for installing scripts for NSClient++?

Tom

Re: Monitoring file count on remote windows machine

Posted: Wed Jul 26, 2017 9:26 am
by tgriep
I haven't run the old 3.9.x version of NSClient++ so the check_files command may not be in that version.
I suggest upgrading to the latest 4.4.x version and that check should work with that version.
You can download it at this link.
http://www.nsclient.org/download/0.4.4/
I suggest uninstalling the old version, delete the leftover files and install the new version. Sometimes the upgrade has issues overwriting the 3.9.x install.

Re: Monitoring file count on remote windows machine

Posted: Wed Jul 26, 2017 5:29 pm
by tmattingly
I don't see it in the thread but someone asked me to upgrade to the 4.4 NSClient++. That fixed the issue and at the Nagios console it works! Yippeee.

On a BUG NOTE I just upgraded to 5.4.7 and the latest client 4.4 is not listed in the wizard as a choice. This should be fixed. I downloaded the 3.9 that was recommended.

check_nrpe is working my question is do I need to upgrade? It was uploaded 6/6/2012

I do have questions on tying the check_nrpe plugin into a service and service template but should I post that question separately?

Tom

Re: Monitoring file count on remote windows machine

Posted: Wed Jul 26, 2017 5:37 pm
by tacolover101
yeah, the wizards still link the old versions that they do testing with I think.

you should take a look at NCPA and see what you think of it. it's comparable to nsclient++ - https://www.nagios.org/ncpa/

Re: Monitoring file count on remote windows machine

Posted: Thu Jul 27, 2017 10:11 am
by lmiltchev
@tmattingly I am glad that your current issue has been resolved!

Is it OK to close this post? You can start a new thread if you have any unrelated questions. Thank you!

Re: Monitoring file count on remote windows machine

Posted: Thu Jul 27, 2017 11:58 am
by tmattingly
Yes, please close. Thanks for showing different ways of doing this and helping me with using the right version of NSClient++.

Please log the bug about 5.4.7 having the wrong NSClient++ references in the Wizard.

Tom