graph Unit Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Grapah Unit Error

Post 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?
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Grapah Unit Error

Post by nscott »

How far along the process did you get from my previous post?
Nicholas Scott
Former Nagios employee
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Grapah Unit Error

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Grapah Unit Error

Post 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.
Nicholas Scott
Former Nagios employee
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Grapah Unit Error

Post by lamin »

I have configured directory_file_count for my windows servers but it is not working.
You do not have the required permissions to view the files attached to this post.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Grapah Unit Error

Post 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.
Nicholas Scott
Former Nagios employee
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Grapah Unit Error

Post by lamin »

I am still not getting data from directory_file_count plugin.
You do not have the required permissions to view the files attached to this post.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Grapah Unit Error

Post 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.
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Grapah Unit Error

Post by lamin »

Is there any solution for my issue? Please I need to resolve it asap.

Thanks
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Grapah Unit Error

Post 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
Nicholas Scott
Former Nagios employee