How do you configure hosts in a better way?
Posted: Fri Sep 28, 2012 6:02 am
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%
}
############ 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%
}