Monitoring disk space on windows PC


#1

I’ve followed all the steps in nagios.sourceforge.net/docs/3_0/ … ndows.html and reloaded nagios but it still doesn’t check the disk space on the remote server. I didn’t receive any errors or warnings on the reload. The only thing that I can see that might be the problem in that the system tray icon on the windows server didn’t change to the yellow circle with an “m” in it, it still shows as a blue plus sign over a green plus sign. I’m at a loss at to why it never changed, I edited the ini file as it said and have restarted the service several times and still no joy.

Thanks in advance for any help


#2

It is not possible to help you based on the information you have provided. You need to study the nsclient documentation and do some trouble shooting yourself.
There is a test functionality in nsclient and also a log file.


#3

From the system tray icon I can inject:

CheckDriveSize ShowAll MinWarnFree=10% MinCritFree=5% Drive=c:
CRITICAL: C:: Total: 74.5G - Used: 71.2G (95%) - Free: 3.28G (5%) < critical

and I get a reply. I’ve edited the windows.cfg file and changed the host_name to the name of the server everywhere it says to. Now when I try to restart nagios I get:

Warning: Duplicate definition found for host ‘TheWell’ (config file ‘/etc/nagios3/mysite/windows.cfg’, starting on line 25)
Error: Could not add object property in file ‘/etc/nagios3/mysite/windows.cfg’ on line 27.

These lines are:

define host{ use windows-server ; Inherit default values from a template host_name TheWell ; The name we're giving to this host alias The Well ; A longer name associated with the host address 192.168.1.100 ; IP address of the host }

For the life of me I can’t figure out where the duplication is at.


#4

No idea what I did but its now started without giving any errors.


#5

Finally after weeks of trying to get this to monitor it’s working, well kinda working. I’ve attached a screen shot of what Nagios reports for The Well, now that its at least trying how do I clear up the connection and missing parameters issues?



#6

You still have some basic error in nsclient config. Try (while testing) to uncomment all modules (.dll) . Chnage password and allow ip to blank.
Then check the log. You can also enable debug logging.


#7

DOH! I’m feeling pretty stupid.

When I made a copy of the nsc.ini file I forgot to change the extension, I aslo found that in the commands.cfg I had commented out the check_nt command because it was duplicated in the nagio-plugins folder but defined differently, after copying the definition from the commands.cfg, commenting out the nt.cfg definition and adding the definition from the commands.cfg everything is working.