How do you configure hosts in a better way?

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
karthick87
Posts: 3
Joined: Fri Sep 28, 2012 5:34 am

How do you configure hosts in a better way?

Post by karthick87 »

I would like to know that which option will be more efficient to configure hosts for nagios monitoring. We have created a seperate configuration files for each hosts with the following configurations as Host-39_78.cfg, Some says using templates will be better, if templates are better can someone share me the similar configuration in template as a sample pls?

############ Host Definition ################

define host{
host_name Host-39_78
alias Host-39_78
address 172.29.39.78
check_command check-host-alive
max_check_attempts 3
notification_interval 120
notification_period 24x7
notification_options d,r
contact_groups smsgrp_important
}

########## Service Definition ##################

define service{
host_name Chn-39_78
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 2
retry_check_interval 1
notification_options w,u,c,r
notification_interval 8640
notification_period 24x7
notifications_enabled 0
check_command check_ping!100.0,20%!500.0,60%
}
User avatar
inventsekar
Posts: 37
Joined: Fri Jul 20, 2012 11:29 am

Re: How do you configure hosts in a better way?

Post by inventsekar »

Well, as per my understanding,
- You can create a single config file for each type of nodes you want to monitor (for example - for all Linux hosts, remote-linux-hosts.cfg, for windows - remote-windows-hosts.cfg, etc)
- grouping the hosts and the services together will make it easier to identify what services are monitoring under which hosts...

hope this gave you some ideas... thanks...
karthick87
Posts: 3
Joined: Fri Sep 28, 2012 5:34 am

Re: How do you configure hosts in a better way?

Post by karthick87 »

If you dont mind, Could you pls post here a sample configuration pls..
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: How do you configure hosts in a better way?

Post by mguthrie »

The links below cover both template usage and some other common methods that a lot of people use to simplify config management.

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

http://nagios.sourceforge.net/docs/3_0/ ... ricks.html
Locked