Page 1 of 2
error applying configuration
Posted: Wed Jul 21, 2021 11:55 am
by matson-itops
getting a very generic error.
Error: Service notification period '24x7' specified for contact 'XYZ' is not defined anywhere!
Error: Could not register contact (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 44)
however, I clearly have below in timerperiods.cfg
define timeperiod {
timeperiod_name xi_timeperiod_24x7
alias 24x7
name xi_timeperiod_24x7
saturday 00:00-24:00
friday 00:00-24:00
thursday 00:00-24:00
wednesday 00:00-24:00
tuesday 00:00-24:00
monday 00:00-24:00
sunday 00:00-24:00
}
please advise.
Re: error applying configuration
Posted: Wed Jul 21, 2021 12:38 pm
by gsmith
Hi
Please send me a System Profile and I can take a look.
To send us your system profile.
1. Login to the Nagios XI GUI using a web browser.
2. Click the "Admin" > "System Profile" Menu
3. Click the "Download Profile" button
4. Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.
Thanks
Re: error applying configuration
Posted: Mon Jul 26, 2021 1:51 pm
by matson-itops
I have sent you the profile in a private message
Re: error applying configuration
Posted: Tue Jul 27, 2021 9:56 am
by gsmith
Hi
I loaded your configuration and everything went smoothly.
From the error message it looks like it was complaining about the AK ESS Notifications
contact, but he looks fine.
Could you try again please? Also, check the permissions on the /usr/local/nagios/etc directory
and its contents.
Thanks
Re: error applying configuration
Posted: Wed Jul 28, 2021 11:17 am
by matson-itops
getting these errors
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 561.
Error: Service notification period 'asartipo_notification_times' specified for contact 'AK Tos Dev Team' is not defined anywhere!
Error: Could not register contact (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 44)
permissions look fine
]$ pwd
/usr/local/nagios/etc
]$ ls -al
total 428
drwxrwxr-x 8 apache nagios 4096 Jul 28 09:15 .
drwxr-xr-x 10 root root 128 Feb 23 13:38 ..
-rw-rw-r-- 1 apache nagios 1827 Jul 9 11:15 cgi.cfg
-rw-rw-r-- 1 apache nagios 28898 Jul 20 12:19 commands.cfg
-rw-rw-r-- 1 apache nagios 4500 Jul 20 12:19 contactgroups.cfg
-rw-rw-r-- 1 apache nagios 49331 Jul 20 12:19 contacts.cfg
-rw-rw-r-- 1 apache nagios 41454 May 18 10:58 contacts.cfg_orig
-rw-rw-r-- 1 apache nagios 1722 Jul 20 12:19 contacttemplates.cfg
-rw-rw-r-- 1 apache nagios 796 Jul 20 12:19 hostdependencies.cfg
-rw-rw-r-- 1 apache nagios 794 Jul 20 12:19 hostescalations.cfg
-rw-rw-r-- 1 apache nagios 786 Jul 20 12:19 hostextinfo.cfg
-rw-rw-r-- 1 apache nagios 3549 Jul 20 12:19 hostgroups.cfg
drwxrwxr-x 2 apache nagios 32768 Jul 28 09:15 hosts
Re: error applying configuration
Posted: Wed Jul 28, 2021 11:24 am
by matson-itops
it looks like NONE of the time periods work for this contact
Error: Service notification period '24x7' specified for contact 'AK Tos Dev Team' is not defined anywhere!
Re: error applying configuration
Posted: Wed Jul 28, 2021 11:48 am
by gsmith
Hi,
Let's try this:
1. delete the 'AK Tos Dev Team' contact
2. Apply Configuration
3. Fix any errors - reach out to me if you need help
4. Once all the errors are gone create the 'AK Tos Dev Team' contact and try assigning the
time periods you require.
Thanks
Re: error applying configuration
Posted: Fri Jul 30, 2021 11:34 am
by matson-itops
did not work. looks like the error just moved to the next contact.
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 547.
Error: Service notification period '24x7' specified for contact 'AK Tos Support' is not defined anywhere!
Error: Could not register contact (config file '/usr/local/nagios/etc/contacts.cfg', starting on line 44)
Re: error applying configuration
Posted: Fri Jul 30, 2021 12:03 pm
by gsmith
Hi
That is strange.
Go to the Core Config Manager. In the left-hand pane under Tools
hit Config File Management
Hit the red "Delete Files" button - it's OK, really!
Hit the blue "Write Configs" button
run
Code: Select all
tar cvzf /tmp/cfgs.tar.gz /usr/local/nagios/etc/*.cfg
send me the tar cvzf /tmp/cfgs.tar.gz *.cfg please
Go back to the browser and hit the white Verify Files button
If there are any errors reported please take a screenshot of them and send it
to me.
Thanks
Re: error applying configuration
Posted: Fri Jul 30, 2021 12:14 pm
by matson-itops
attached error
looks like we have a bad config file in CCM
please advise