I'm very new to Nagios.
I can't apply the configuration now. I get these errors.
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
Error: Contact 'parekal' is not defined anywhere!
Error: Could not add contact 'parekal' to host (config file '/usr/local/nagios/etc/hosts/fema.ibts.org.cfg', starting on line 16)
I know another admin who also doesn't know Nagio, cleaned up the user list which had many people that don't work for us anymore. I'm sure that's what caused this. I added the user back but then got errors about host notification and service notification commands missing for the user. I would prefer just to keep the users deleted.
Getting errors after someone deleted some users
Re: Getting errors after someone deleted some users
That's because the contact was removed but the contact wasn't removed from the hosts/services. You can try doing this:
Please go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Then click the Verify Files button, if it verifies properly, please try to Apply Configuration
That alone may fix it.
Technically, you can edit the objects it's talking about:
Error: Contact 'parekal' is not defined anywhere!
Error: Could not add contact 'parekal' to host (config file '/usr/local/nagios/etc/hosts/fema.ibts.org.cfg', starting on line 16)
So that means you would go to Configure > Core Config Manager > Hosts:
- Edit the fema.ibts.org host
- Click the Alert Settings tab
- Make sure parekal is not selected
- Save, then try to apply (note, you may not see the contact listed, just save it anyways to write out the changes).
If all that doesn't fix it, do this:
Go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Once they are done being written (don't do anything in between, don't apply config or anything), run this command and send me the resulting /tmp/NAGIOSBADFILES.zip file:
Please send me a copy of your profile as well, you can download it from Admin > System Profile by clicking the Download Profile button.
Please go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Then click the Verify Files button, if it verifies properly, please try to Apply Configuration
That alone may fix it.
Technically, you can edit the objects it's talking about:
Error: Contact 'parekal' is not defined anywhere!
Error: Could not add contact 'parekal' to host (config file '/usr/local/nagios/etc/hosts/fema.ibts.org.cfg', starting on line 16)
So that means you would go to Configure > Core Config Manager > Hosts:
- Edit the fema.ibts.org host
- Click the Alert Settings tab
- Make sure parekal is not selected
- Save, then try to apply (note, you may not see the contact listed, just save it anyways to write out the changes).
If all that doesn't fix it, do this:
Go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Once they are done being written (don't do anything in between, don't apply config or anything), run this command and send me the resulting /tmp/NAGIOSBADFILES.zip file:
Code: Select all
zip -r /tmp/NAGIOSBADFILES.zip /usr/local/nagios/etc