Can someone please post instructions for how to monitor more than one Windows client? The quick start guide only talks about monitoring one host. I’ve looked all over the internet, but cannot find a straight-forward guide on adding more than one client.
The quickstart guide just lists an example of one. Simply repeat in the same file. If you have identical services you can even use the same service definition for multiple servers. If you want it for everything I suggest using the hostgroup. If just a few use a comma separated list.
Define hostgroups in your hostgroups.cfg file like so:
define hostgroup{
hostgroup_name servers
alias Windows Servers
}
Then in your service definition, instead of specifying individual hosts, specify a hostgroup like so:
define service{
use standard-service
hostgroup_name servers
service_description Disk Usage C
check_command check_nt_disk!C!80!90
normal_check_interval 60
}
Finally, in your host config, specify the hostgroups it should be a member of like so:
define host{
use windows-server
host_name fileserver
alias fileserver
address 192.168.0.1
hostgroups servers
}
If it’s not in: /usr/local/nagios/etc/objects/ then you will have to create it. Just copy one of the other .cfg files (like windows.cfg) and make the necessary adjustments.
Then you have to tell the nagios.cfg file to use hostgroups.cfg.
I then created a windows1.cfg and configured it for my new box. I restarted init.d but now my Nagios stopped working.
Am I able to do what I did?[/quote]
Make sure you put a / in front of usr. Also, make sure you have a / after objects. From what you typed above, the location is incorrect. Should look like this: **/usr/local/nagios/etc/objects/**windows1.cfg
I’m pretty new to Nagios myself so I might not have the answers for you, but I can try to help.
When are you getting the “connection refused” message? Are you trying to monitor Windows PC’s? I had the same problem trying to monitor Windows 2000 servers until I added the IP address of my Nagios box in the NSC.ini file. I am using NSClient++ on the Windows machines.
I managed to get it working in the end. I switched over to NSClient+±0.3.6-RC7-Win32.msi and that seemed to work very well. My next issue is monitoring multiple machines.
So far, I edited my Nagios.cfg to look in /USR/LOCAL/NAGIOS/ETC/SERVERS in here I copy windows.cfg and a new one called windows1.cfg. I edited both of these files for each server.
I tried to resrtard Nagios but now it’s complaining about deuplicate name of alias on my hostgroups.
Can someone clarify what that means exactly?
Thanks for all your help, I am 90% of the way done :mrgreen: