Page 1 of 1

Monitoring Multiple Hosts

Posted: Mon Nov 15, 2010 7:00 am
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 ;)

Re: Monitoring Multiple Hosts

Posted: Thu Nov 18, 2010 12:13 am
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...

Re: Monitoring Multiple Hosts

Posted: Thu Nov 18, 2010 4:39 am
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 :)

Re: Monitoring Multiple Hosts

Posted: Thu Nov 18, 2010 4:13 pm
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.

Re: Monitoring Multiple Hosts

Posted: Thu Nov 18, 2010 11:49 pm
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 :)