CONFIG ERROR! Reload aborted. Check your Nagios configuration.
jonas kellens
jonas.kellens at telenet.be
Sat Oct 31 11:06:47 CET 2009
In /usr/local/nagios/etc/objects I have created a new asterisk.cfg :
[root at nagios objects]# ls -al
-rw-r--r-- 1 nagios nagios 1483 Oct 31 12:03 asterisk.cfg
-rw-rw-r-- 1 nagios nagios 7714 Oct 30 19:30 commands.cfg
-rw-rw-r-- 1 nagios nagios 2166 Oct 30 19:30 contacts.cfg
-rw-rw-r-- 1 nagios nagios 5403 Oct 30 19:30 localhost.cfg
-rw-rw-r-- 1 nagios nagios 3124 Oct 30 19:30 printer.cfg
-rw-rw-r-- 1 nagios nagios 3293 Oct 30 19:30 switch.cfg
-rw-rw-r-- 1 nagios nagios 10812 Oct 30 19:30 templates.cfg
-rw-rw-r-- 1 nagios nagios 3209 Oct 30 19:30 timeperiods.cfg
-rw-rw-r-- 1 nagios nagios 4019 Oct 30 19:30 windows.cfg
In /usr/local/nagios/etc/nagios.cfg I have added :
# You can specify individual object config files as shown below:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
# Definitions for monitoring the local (Linux) host
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
# Definitions for monitoring the Hosted Asterisk server
cfg_file=/usr/local/nagios/etc/objects/asterisk.cfg
# Definitions for monitoring a Windows machine
#cfg_file=/usr/local/nagios/etc/objects/windows.cfg
# Definitions for monitoring a router/switch
#cfg_file=/usr/local/nagios/etc/objects/switch.cfg
# Definitions for monitoring a network printer
#cfg_file=/usr/local/nagios/etc/objects/printer.cfg
The asterisk.cfg contains the following :
# Define a host for Hosted Asterisk
define host{
use linux-server ; Name of host
template to use
; This host definition will inherit all variables that are
defined
; in (or inherited by) the linux-server host template definition.
host_name asterisk
alias Hosted Asterisk
address ip_address
max_check_attempts 3
check_period 24x7
contact_groups admins
notification_interval 30
notification_period 24x7
}
###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################
define service{
host_name asterisk
service_description Root Partition
max_check_attempts 5
check_interval 5
retry_interval 3
check_period 24x7
contact_groups admins
check_command check_nrpe!check_disk
}
But I always get the config error :
[root at nagios objects]# service nagios reload
Running configuration check... CONFIG ERROR! Reload aborted. Check
your Nagios configuration.
Could someone tell me why ?!
According to the Nagios documentation
(http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html) I have
all the necessary fields filled in.
Jonas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091031/01e1df00/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list