Re: Error: Could not read object configuration data!
Posted: Thu Feb 14, 2013 11:08 am
I searched in my nagios.cfg file and could not find anywhere "nagios-admin". I didnt include the ""
.
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
/usr/local/nagios/etc/commands.cfgCode: Select all
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
define command {
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}Code: Select all
/etc/nagios/objects/commands.cfgCode: Select all
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
Code: Select all
cfg_file=/etc/nagios/objects/commands.cfgCode: Select all
cfg_file=/etc/nagios/checkcommands.cfg
cfg_file=/etc/nagios/misccommands.cfg
cfg_file=/etc/nagios/minimal.cfg
Code: Select all
#cfg_file=/etc/nagios/contactgroups.cfg
#cfg_file=/etc/nagios/contacts.cfg
#cfg_file=/etc/nagios/dependencies.cfg
#cfg_file=/etc/nagios/escalations.cfg
#cfg_file=/etc/nagios/hostgroups.cfg
#cfg_file=/etc/nagios/hosts.cfg
#cfg_file=/etc/nagios/services.cfg
#cfg_file=/etc/nagios/timeperiods.cfg
#cfg_file=/etc/nagios/hostextinfo.cfg
#cfg_file=/etc/nagios/serviceextinfo.cfg
#cfg_dir=/etc/nagios/servers
#cfg_dir=/etc/nagios/printers
#cfg_dir=/etc/nagios/switches
#cfg_dir=/etc/nagios/routersCode: Select all
ls -la /etc/nagios
ls -la /etc/nagios/objectsCode: Select all
# ls -la /etc/nagios
total 156
drwxr-xr-x. 3 root root 4096 Feb 14 16:56 .
drwxr-xr-x. 69 root root 4096 Feb 4 16:22 ..
-rw-rw-r--. 1 nagios nagios 9506 Oct 20 20:50 cgi.cfg
-rw-r--r--. 1 root root 4816 Oct 20 20:50 checkcommands.cfg
-rw-r--r--. 1 root root 15860 Nov 26 2010 command-plugins.cfg
-rw-r--r--. 1 root root 26 Oct 20 20:50 htpasswd.users
-rw-r--r--. 1 root root 11330 Oct 20 20:50 minimal.cfg
-rwxrwxrwx 1 root root 1568 Feb 14 09:02 misccommands.cfg
-rw-rw-r--. 1 nagios nagios 30519 Oct 20 20:50 nagios.cfg
-rw-rw-r-- 1 root root 30521 Feb 14 08:51 nagios.cfg.test
-rw-r--r--. 1 root root 7207 Nov 11 2010 nrpe.cfg
-rw-r--r--. 1 root root 5326 Nov 12 2010 nsca.cfg
drwxr-xr-x. 2 nagios nagios 4096 Oct 20 20:47 objects
-rw-r--r-- 1 root root 0 Feb 14 08:53 One
-rw-rw----. 1 nagios nagios 1340 Nov 26 2010 resource.cfg
-rw-r--r--. 1 root root 1628 Nov 12 2010 send_nsca.cfg
# ls -la /etc/nagios/objects
total 56
drwxr-xr-x. 2 nagios nagios 4096 Oct 20 20:47 .
drwxr-xr-x. 3 root root 4096 Feb 14 16:56 ..
-rw-rw-r--. 1 nagios nagios 7696 Nov 26 2010 commands.cfg
-rw-rw-r--. 1 nagios nagios 2166 Nov 26 2010 contacts.cfg
-rw-rw-r--. 1 nagios nagios 5403 Nov 26 2010 localhost.cfg
-rw-rw-r--. 1 nagios nagios 3124 Nov 26 2010 printer.cfg
-rw-rw-r--. 1 nagios nagios 3293 Nov 26 2010 switch.cfg
-rw-rw-r--. 1 nagios nagios 10812 Nov 26 2010 templates.cfg
-rw-rw-r--. 1 nagios nagios 3209 Nov 26 2010 timeperiods.cfg
-rw-rw-r--. 1 nagios nagios 4019 Nov 26 2010 windows.cfg
Code: Select all
/usr/bin/nagios -v /etc/nagios/nagios.cfgCode: Select all
/usr/bin/nagios -v /etc/nagios/nagios.cfg
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Warning: comment_file variable ignored. Comments are now stored in the status a nd retention files.
Warning: downtime_file variable ignored. Downtime entries are now stored in the status and retention files.
Warning: aggregate_status_updates directive ignored. All status file updates ar e now aggregated.
Read main config file okay...
Processing object config file '/etc/nagios/checkcommands.cfg'...
Processing object config file '/etc/nagios/misccommands.cfg'...
Processing object config file '/etc/nagios/minimal.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Checked 5 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 20 commands.
Checking time periods...
Checked 1 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Code: Select all
Whoops!
Error: Could not read object configuration data!
Here are some things you should check in order to resolve this error:
Verify configuration options using the -v command-line option to check for errors.
Check the Nagios log file for messages relating to startup or status data errors.
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.