Page 2 of 3

Re: Grapah Unit Error

Posted: Thu Aug 25, 2011 11:53 am
by lamin
I still cannot get nagiosxi to watch the number of files in a specific directory. I was using check_dir but I was getting some error. Any idea?

Re: Grapah Unit Error

Posted: Thu Aug 25, 2011 1:07 pm
by nscott
How far along the process did you get from my previous post?

Re: Grapah Unit Error

Posted: Thu Aug 25, 2011 2:07 pm
by lamin
I did install the nagios agent for windows and I am seeing some stuffs. but still more to go for directory monitoring. Please check attachments.

Re: Grapah Unit Error

Posted: Fri Aug 26, 2011 9:55 am
by nscott
lamin,

Make sure the check_dir.exe script is located on the Windows box in nsclient++'s scripts directory. The default for that is C:\Program Files\NSClient++\scripts

If thats a new command you're adding you'll also have to add it to (I assume you're using NSClient++) NSClient++'s nsc.ini file. In that ini file you'll have to add a line like this to the External Scripts section:

check_dir=scripts\check_dir.exe

Then under the external alias section add an entry like this

alias_check_dir=check_dir <put its arguments here>

Then test it by running tests against it on the command line of you Nagios box:

/usr/local/nagios/libexec/check_nt -H <your host> -p <your port> -s <password if you have it> -c check_dir -a <arguments for the check_dir plugin>

If that doesn't work, go back and look at your NSClient++ config.

Re: Grapah Unit Error

Posted: Mon Aug 29, 2011 2:47 pm
by lamin
I have configured directory_file_count for my windows servers but it is not working.

Re: Grapah Unit Error

Posted: Tue Aug 30, 2011 9:39 am
by nscott
lamin,

Make sure after editing the ini file you're restarting the NSClient++ service. And when running the command from the Linux command line you'll need to translate Windows file paths like so:

Original:

D:\Program Files\Next Path\Here

'D:/Program Files/Next Path/Here'

Note you want to use single quotes around it and change the backslashes to forward slashes.

Re: Grapah Unit Error

Posted: Thu Sep 01, 2011 9:47 am
by lamin
I am still not getting data from directory_file_count plugin.

Re: Grapah Unit Error

Posted: Thu Sep 01, 2011 3:26 pm
by agriffin
Just an update that we are still working to help you find a solution. We need to set up some tests and we'll get back to you soon.

Re: Grapah Unit Error

Posted: Fri Sep 02, 2011 8:40 am
by lamin
Is there any solution for my issue? Please I need to resolve it asap.

Thanks

Re: Grapah Unit Error

Posted: Mon Sep 12, 2011 12:31 pm
by nscott
Lamin,

It looks like this one got pushed to the back.

I was doing some reading on this topic and it looks like what you're trying to do requires the use of check_nrpe, and you're currently running check_nt, which will not allow outside scripts to be run.

The new version of NSClient++ actually has a CheckFiles command built in. Since its a rather laborious process adding a new NRPE command to NSClient, I'd suggest you install NSClient .3.9, enable NRPE, open the firewall and use the

./check_nrpe -H <your windows server> -p 5666 -c CheckFiles -a path=C:\mypath

And then tweak the filter variable that is well documented here:
http://www.nsclient.org/nscp/wiki/CheckFiles