Getting errors configuration time

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
srikanth
Posts: 7
Joined: Thu Jan 26, 2012 3:21 am

Getting errors configuration time

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Getting errors configuration time

Post 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.?
Be sure to check out our Knowledgebase for helpful articles and solutions!
srikanth
Posts: 7
Joined: Thu Jan 26, 2012 3:21 am

Re: Getting errors configuration time

Post 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 ###############################################################################
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Getting errors configuration time

Post 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.
Locked