How to monitor multiple Windows clients


#1

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.

Thanks


#2

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.


#3

How do I use the Hostgroup? Can someone put up a few words on this please?


#4

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 }


#5

Where do I find hostgroups.cfg?


#6

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.


#7

Can you give some examples?


#8

I tried to add in nagios.cfg

cfg_file=usr/local/nagios/etc/objects.windows1.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?


#9

[quote=“Grumblenoise”]I tried to add in nagios.cfg

cfg_file=usr/local/nagios/etc/objects.windows1.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


#10

Yes that’s what I had sorry. Was typing across screen and my eye sight is not the best!

I am also getting connection refused, I am using the NC_Net client?

Thanks for your help, it’s appreciated.


#11

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.


#12

is the remote machine configured to accept connections from the machine that is making checks ?


#13

Hi Guys,

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:


#14

All sorted! :mrgreen:

I just put everything in my windows.cfg. I think I was over complicating things. Thank’s to all who helped.

:stuck_out_tongue: