Monitoring Multiple Hosts

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amithad
Posts: 6
Joined: Mon Nov 08, 2010 11:52 pm

Monitoring Multiple Hosts

Post by amithad »

Hi,

could someone send me the details how to monitor multiple windows hosts using Nagios? what file should I edit? windows.cfg?

a sample configuration file is appreciated...

Thanks ;)
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Monitoring Multiple Hosts

Post by mguthrie »

http://nagios.sourceforge.net/docs/3_0/ ... ndows.html

A good practice is to create a folder for all of your hosts, and then a separate file for each host. Also create a separate folder for all of your services, and then create a cfg file with the host's name, and all of it's services. The nagios.cfg file lets you include a whole directory instead of an individual file, which is the easiest way to add new items. I'll try to remember to post some sample configs tomorrow...
amithad
Posts: 6
Joined: Mon Nov 08, 2010 11:52 pm

Re: Monitoring Multiple Hosts

Post by amithad »

Hi,

Thanks a lot for the info. will try what u have explained above. hope you will send some samples regarding the configuration.

Thanks

Amitha :)
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Monitoring Multiple Hosts

Post by mguthrie »

NOTE: These directories might be in a different location depending on if you installed from source, apt, or yum.

Edit your nagios/etc/nagios.cfg file so that is has include directories like so (use your directory paths, not mine):

Code: Select all

cfg_dir=/usr/local/nagios/etc/hosts
cfg_dir=/usr/local/nagios/etc/services

Then create a new host config file in the hosts directory:
/usr/local/nagios/etc/hosts

That looks something like this:

Code: Select all

define host {
        host_name                       www.facebook.com
        use                             my_host_template
        address                         www.facebook.com
        contacts                        dummy
        register                        1
        }
I recommend defining all other settings in a common template.

Then create a config file in your services directory like so:
mine is: /usr/local/nagios/etc/services

Code: Select all

define service {
        host_name                       www.facebook.com
        service_description             DNS IP Match
        use                             my_service_template
        check_command                   check_dns!-a 66.220.149.25
        contacts                        dummy
        register                        1
        }
Again, use common settings in a template. Put all of your service definitions for that host in a single file so that way it's organized and easy to find.
amithad
Posts: 6
Joined: Mon Nov 08, 2010 11:52 pm

Re: Monitoring Multiple Hosts

Post by amithad »

Thanks mguthrie,

I'll configure the settings as you wrote. Further to the configuration, what service should i enable to monitor the bandwidth usage of each host? this is to get an idea of a workstation with is infected by a trojan or a worm.

Thanks & Best Regards

Amitha :)
Locked