Greetings
I installed Nagios and have 9 hosts monitored so far. As I’m reading through nagios how-to’s, many people config their cfg files differently than how I have mine setup. Is there a recommended method? For example, by default, there was a localhost.cfg file and I created additional host definitions as well as creating additional service definitions and it worked like a charm. but now that I want to create additional cfg’s for checking internet connectivity (ping isp nameserver) yet when I restart nagios I’m receiving Running configuration check… CONFIG ERROR! Restart aborted. Check your Nagios configuration.
here’s my internet.cfg file:
define host{
use generic-host ; Name of host template to use
host_name google
alias Google Webserver
address www.google.com
check_command check-host-alive
max_check_attempts 20
notification_interval 120
notification_period 24x7
notification_options d,u,r
}
Define an optional hostgroup for Linux machines
define hostgroup{
hostgroup_name web ; The name of the hostgroup
alias Internet connectivityers ; Long name of the group
members google ; Comma separated list of hosts that belong to this group
}
define service{
use generic-service
host_name www.google.com
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups select-users-my_cluster
notification_interval 120
notification_period 24x7
notification_options c,r
check_command check_ping!100.0,20%!500.0,60%
}