Page 1 of 1

Getting errors configuration time

Posted: Tue Jan 31, 2012 4:16 am
by srikanth
Hi All,

I am getting below errror...


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...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Warning: Duplicate definition found for contact 'xi_default_contact' (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 70)
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 71.
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

Re: Getting errors configuration time

Posted: Tue Jan 31, 2012 11:39 am
by lmiltchev
Did you try opening the "contacts.cfg" file in a text editor and checking line 71 (or around line 71) for any errors, typos, etc.?

Re: Getting errors configuration time

Posted: Wed Feb 01, 2012 12:00 am
by srikanth
Thanks for your reply.

In my contacts.cfg file i couldn't see 71 line, find the output below

[root@ustr-vm-nagios ~]# cat -n /usr/local/nagios/etc/contacts.cfg
1 ###############################################################################
2 #
3 # Contact configuration file
4 #
5 # Created by: Nagios QL Version 3.0.3
6 # Date: 2012-01-30 00:01:51
7 # Version: Nagios 3.x config file
8 #
9 # --- DO NOT EDIT THIS FILE BY HAND ---
10 # Nagios QL will overwite all manual settings during the next update
11 #
12 ###############################################################################
13
14 define contact {
15 contact_name nagiosadmin
16 alias Nagios Administrator
17 host_notifications_enabled 1
18 service_notifications_enabled 1
19 host_notification_period nagiosadmin_notification_times
20 service_notification_period nagiosadmin_notification_times
21 host_notification_options d,u,r,f,s
22 service_notification_options w,u,c,r,f,s
23 host_notification_commands xi_host_notification_handler
24 service_notification_commands xi_service_notification_handler
25 email nagios@localhost
26 use xi_contact_generic
27 }
28
29
30 ###############################################################################
31 #
32 # Contact configuration file
33 #
34 # END OF FILE
35 #
36 ###############################################################################

Re: Getting errors configuration time

Posted: Wed Feb 01, 2012 10:37 am
by mguthrie
See:
http://support.nagios.com/wiki/index.ph ... leshooting

on how to troubleshoot a configuration error. If the Apply Config failed, XI has already rolled back the config to the last known good configuration, so you won't be able to find the error in the config files.