You are not logged in.
Pages: 1
Hello,
I'm having some difficulty getting Nagios configured. The following configuration gives this error:
Error: Invalid notification_interval value for host '12monkeys.wyattnetworks.com'
Error: Could not register host (config file '/usr/local/etc/nagios/localhost.cfg', starting on line 272)
I also believe there are probably other mistakes with my configuration...
Any ideas?
###############################################################################
# LOCALHOST.CFG - SAMPLE OBJECT CONFIG FILE FOR MONITORING THIS MACHINE
#
# Last Modified: 11-27-2006
#
# NOTE: This config file is intended to servce as an *extremely* simple
# example of how you can create your object configuration file(s).
#
###############################################################################
###############################################################################
###############################################################################
#
# TIME PERIODS
#
###############################################################################
###############################################################################
# This defines a timeperiod where all times are valid for checks,
# notifications, etc. The classic "24x7" support nightmare. :-)
define timeperiod{
timeperiod_name 24x7
alias 24 Hours A Day, 7 Days A Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
}
# 'workhours' timeperiod definition
define timeperiod{
timeperiod_name workhours
alias "Normal" Working Hours
monday 09:00-17:00
tuesday 09:00-17:00
wednesday 09:00-17:00
thursday 09:00-17:00
friday 09:00-17:00
}
# 'nonworkhours' timeperiod definition
define timeperiod{
timeperiod_name nonworkhours
alias Non-Work Hours
sunday 00:00-24:00
monday 00:00-09:00,17:00-24:00
tuesday 00:00-09:00,17:00-24:00
wednesday 00:00-09:00,17:00-24:00
thursday 00:00-09:00,17:00-24:00
friday 00:00-09:00,17:00-24:00
saturday 00:00-24:00
}
# 'none' timeperiod definition
define timeperiod{
timeperiod_name none
alias No Time Is A Good Time
}
###############################################################################
###############################################################################
#
# COMMANDS
#
###############################################################################
###############################################################################
# NOTE: Sample command definitions can now be found in the sample commands.cfg
# file
###############################################################################
###############################################################################
#
# CONTACTS
#
###############################################################################
###############################################################################
# In this simple config file, a single contact will receive all alerts.
# This assumes that you have an account (or email alias) called
# "nagios-admin" on the local host.
define contact{
contact_name nagios-admin
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email wyatt@wyattnetworks.com
}
###############################################################################
###############################################################################
#
# CONTACT GROUPS
#
###############################################################################
###############################################################################
# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagios-admin
}
###############################################################################
###############################################################################
#
# HOSTS
#
###############################################################################
###############################################################################
# Generic host definition template - This is NOT a real host, just a template!
define host{
name 12monkeys.wyattnetworks.com ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 3
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
define host{
name ns.lowcostdomains.com ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 3
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
define host{
name ns2.lowcostdomains.com ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 3
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
define host{
name ml2.myemail.com ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 3
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
define host{
name ml3.myemail.com ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 3
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
define host{
name ml4.myemail.com ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 3
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
define host{
name mailserver.lowcostdomains.com ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 3
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
define host{
name neo.lowcostdomains.com ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 3
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
define host{
name 5thelement.lowcostdomains.com ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_period 24x7 ; Send host notifications at any time
max_check_attempts 3
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
# Since this is a simple configuration file, we only monitor one host - the
# local host (this machine).
define host{
use 12monkeys.wyattnetworks.com ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name 12monkeys.wyattnetworks.com
alias 12monkeys.wyattnetworks.com
address 69.4.242.110
}
define host{
use ns.lowcostdomains.com ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name ns.lowcostdomains.com
alias ns.lowcostdomains.com
address 69.4.242.108
}
define host{
use ns2.lowcostdomains.com ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name ns2.lowcostdomains.com
alias ns2.lowcostdomains.com
address 69.4.242.100
}
define host{
use ml2.myemail.com ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name ml2.myemail.com
alias ml2.myemail.com
address 69.4.242.102
}
define host{
use ml3.myemail.com ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name ml3.myemail.com
alias ml3.myemail.com
address 69.4.242.103
}
define host{
use ml4.myemail.com ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name ml4.myemail.com
alias ml4.myemail.com
address 69.4.242.104
}
define host{
use mailserver.lowcostdomains.com ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name mailserver.lowcostdomains.com
alias mailserver.lowcostdomains.com
address 69.4.242.105
}
define host{
use neo.lowcostdomains.com ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name neo.lowcostdomains.com
alias neo.lowcostdomains.com
address 69.4.242.106
}
define host{
use 5thelement.lowcostdomains.com ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name 5thelement.lowcostdomains.com
alias 5thelement.lowcostdomains.com
address 69.4.242.108
}
###############################################################################
###############################################################################
#
# HOST GROUPS
#
###############################################################################
###############################################################################
# We only have one host in our simple config file, so there is no need to
# create more than one hostgroup.
define hostgroup{
hostgroup_name all
alias all
members 12monkeys.wyattnetworks.com,ns.lowcostdomains.com,ns2.lowcostdomains.com,ml2.myemail.com,ml3.myemail.com,ml4.myemail.com,mailserver.lowcostdomains.com,neo.lowcostdomains.com,5thelement.lowcostdomains.com
}
###############################################################################
###############################################################################
#
# SERVICES
#
###############################################################################
###############################################################################
# Generic service definition template - This is NOT a real service, just a template!
define service{
name all ; The 'name' of this service template, referenced in other service definitions
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
max_check_attempts 3
register 1 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
define service{
use all ; Name of service template
hostgroup_name all
service_description SSH
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_ssh
}
define service{
use all ; Name of service template
hostgroup_name all
service_description DNS
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_dns
}
define service{
use all ; Name of service template
hostgroup_name all
service_description SMTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_smtp
}
define service{
use all ; Name of service template
hostgroup_name all
service_description POP3
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_pop
}
define service{
use all ; Name of service template
hostgroup_name all
service_description HTTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_http
}
define service{
use all ; Name of service template
hostgroup_name all
service_description FTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_ftp
}Offline
You need to include a notification_interval setting in your config. You can inherit it from a 'generic' host by creating a "template". Here's my template from my Nagios:
define host{
name linux-host
check_command check-host-alive
check_period 24x7 ; Monitor 24/7
normal_check_interval 5 ; Check host every X minutes
max_check_attempts 3 ; Check X times before sending notifications
notifications_enabled 1 ; Host notifications are enabled
notification_interval 0 ; Never resend notifications
notification_period 24x7 ; Send notifications 24/7
notification_options d,r,u
check_freshness 1 ; Make sure we always have fresh information
freshness_threshold 900 ; Data should only be up to 15 minutes old
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}The important line there is the "register" one. It tells Nagios not to load THIS host as a real host, it's just a template to hold settings for other hosts.
Then in the REAL host, include this line to source the template:
define host{
use linux-host
host_name file-server
alias File Server
address 192.168.x.x
}Offline
Thanks very much - I've fixed it all up a bit now. Anything else you notice wrong? I can't actually test it locally and am getting someone else to which is becoming quite tedious.
###############################################################################
# LOCALHOST.CFG - SAMPLE OBJECT CONFIG FILE FOR MONITORING THIS MACHINE
#
# Last Modified: 11-27-2006
#
# NOTE: This config file is intended to servce as an *extremely* simple
# example of how you can create your object configuration file(s).
#
###############################################################################
###############################################################################
###############################################################################
#
# TIME PERIODS
#
###############################################################################
###############################################################################
# This defines a timeperiod where all times are valid for checks,
# notifications, etc. The classic "24x7" support nightmare. :-)
define timeperiod{
timeperiod_name 24x7
alias 24 Hours A Day, 7 Days A Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
}
# 'workhours' timeperiod definition
define timeperiod{
timeperiod_name workhours
alias "Normal" Working Hours
monday 09:00-17:00
tuesday 09:00-17:00
wednesday 09:00-17:00
thursday 09:00-17:00
friday 09:00-17:00
}
# 'nonworkhours' timeperiod definition
define timeperiod{
timeperiod_name nonworkhours
alias Non-Work Hours
sunday 00:00-24:00
monday 00:00-09:00,17:00-24:00
tuesday 00:00-09:00,17:00-24:00
wednesday 00:00-09:00,17:00-24:00
thursday 00:00-09:00,17:00-24:00
friday 00:00-09:00,17:00-24:00
saturday 00:00-24:00
}
# 'none' timeperiod definition
define timeperiod{
timeperiod_name none
alias No Time Is A Good Time
}
###############################################################################
###############################################################################
#
# COMMANDS
#
###############################################################################
###############################################################################
# NOTE: Sample command definitions can now be found in the sample commands.cfg
# file
###############################################################################
###############################################################################
#
# CONTACTS
#
###############################################################################
###############################################################################
# In this simple config file, a single contact will receive all alerts.
# This assumes that you have an account (or email alias) called
# "nagios-admin" on the local host.
define contact{
contact_name nagios-admin
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email wyatt@wyattnetworks.com
}
###############################################################################
###############################################################################
#
# CONTACT GROUPS
#
###############################################################################
###############################################################################
# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagios-admin
}
###############################################################################
###############################################################################
#
# HOSTS
#
###############################################################################
###############################################################################
# Generic host definition template - This is NOT a real host, just a template!
define host{
name default
check_command check-host-alive
check_period 24x7 ; Monitor 24/7
normal_check_interval 1 ; Check host every X minutes
max_check_attempts 3 ; Check X times before sending notifications
notifications_enabled 1 ; Host notifications are enabled
notification_interval 0 ; Never resend notifications
notification_period 24x7 ; Send notifications 24/7
notification_options d,r,u
check_freshness 1 ; Make sure we always have fresh information
freshness_threshold 900 ; Data should only be up to 15 minutes old
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
register 1 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
# Since this is a simple configuration file, we only monitor one host - the
# local host (this machine).
define host{
use default ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name 12monkeys.wyattnetworks.com
alias 12monkeys.wyattnetworks.com
address 69.4.242.110
}
define host{
use default ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name ns.lowcostdomains.com
alias ns.lowcostdomains.com
address 69.4.242.108
}
define host{
use default ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name ns2.lowcostdomains.com
alias ns2.lowcostdomains.com
address 69.4.242.100
}
define host{
use default ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name ml2.myemail.com
alias ml2.myemail.com
address 69.4.242.102
}
define host{
use default ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name ml3.myemail.com
alias ml3.myemail.com
address 69.4.242.103
}
define host{
use default ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name ml4.myemail.com
alias ml4.myemail.com
address 69.4.242.104
}
define host{
use default ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name mailserver.lowcostdomains.com
alias mailserver.lowcostdomains.com
address 69.4.242.105
}
define host{
use default ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name neo.lowcostdomains.com
alias neo.lowcostdomains.com
address 69.4.242.106
}
define host{
use default ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the freebsd-server host template definition.
host_name 5thelement.lowcostdomains.com
alias 5thelement.lowcostdomains.com
address 69.4.242.108
}
###############################################################################
###############################################################################
#
# HOST GROUPS
#
###############################################################################
###############################################################################
# We only have one host in our simple config file, so there is no need to
# create more than one hostgroup.
define hostgroup{
hostgroup_name all
alias all
members 12monkeys.wyattnetworks.com,ns.lowcostdomains.com,ns2.lowcostdomains.com,ml2.myemail.com,ml3.myemail.com,ml4.myemail.com,mailserver.lowcostdomains.com,neo.lowcostdomains.com,5thelement.lowcostdomains.com
}
###############################################################################
###############################################################################
#
# SERVICES
#
###############################################################################
###############################################################################
# Generic service definition template - This is NOT a real service, just a template!
define service{
name all ; The 'name' of this service template, referenced in other service definitions
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
max_check_attempts 3
register 1 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
define service{
use all ; Name of service template
hostgroup_name all
service_description SSH
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_ssh
}
define service{
use all ; Name of service template
hostgroup_name all
service_description DNS
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_dns
}
define service{
use all ; Name of service template
hostgroup_name all
service_description SMTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_smtp
}
define service{
use all ; Name of service template
hostgroup_name all
service_description POP3
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_pop
}
define service{
use all ; Name of service template
hostgroup_name all
service_description HTTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_http
}
define service{
use all ; Name of service template
hostgroup_name all
service_description FTP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options w,u,c,r
check_command check_ftp
}Offline
Nothing that I can see, sorry... I normally just run it past Nagios and see what it complains about ![]()
Offline
Hmm - now I'm getting this error.
Error: Host name, alias, or address is NULL
Error: Could not register host (config file '/usr/local/etc/nagios/localhost.cfg', starting on line 140)
Offline
Have a look at /usr/local/etc/nagios/localhost.cfg on line 140 and what's there?
Offline
Lines 140-159:
define host{
name default
check_command check-host-alive
check_period 24x7 ; Monitor 24/7
normal_check_interval 1 ; Check host every X minutes
max_check_attempts 3 ; Check X times before sending notifications
notifications_enabled 1 ; Host notifications are enabled
notification_interval 0 ; Never resend notifications
notification_period 24x7 ; Send notifications 24/7
notification_options d,r,u
check_freshness 1 ; Make sure we always have fresh information
freshness_threshold 900 ; Data should only be up to 15 minutes old
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
register 1 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}Offline
register 1 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
I assume this IS your template host, in which case you need to set 'register' to 0, not 1...
Offline
Pages: 1