Monitoring file count on remote windows machine

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tmattingly
Posts: 115
Joined: Thu Oct 23, 2014 12:53 pm

Re: Monitoring file count on remote windows machine

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitoring file count on remote windows machine

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
tmattingly
Posts: 115
Joined: Thu Oct 23, 2014 12:53 pm

Re: Monitoring file count on remote windows machine

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring file count on remote windows machine

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
tmattingly
Posts: 115
Joined: Thu Oct 23, 2014 12:53 pm

Re: Monitoring file count on remote windows machine

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitoring file count on remote windows machine

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
tmattingly
Posts: 115
Joined: Thu Oct 23, 2014 12:53 pm

Re: Monitoring file count on remote windows machine

Post 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
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: Monitoring file count on remote windows machine

Post 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/
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring file count on remote windows machine

Post 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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
tmattingly
Posts: 115
Joined: Thu Oct 23, 2014 12:53 pm

Re: Monitoring file count on remote windows machine

Post 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
Locked