This instance of XI has been up for a few years. 318 hosts 1226 services.
Occasionally after adding/changing something we'll get an error on applying configuration.
Usually I look at the error and and figure out what the issue is or worst case roll back to a previous config and start over.
Today I added a host and when I went to apply I get
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/services_WINDOWS_DWS_OITVDC-VDI-04.cfg', starting on line 77)
That file didn't actually exist so I looked in CCM/Services for services_WINDOWS_DWS_OITVDC-VDI-04
There were some services under that config name but they were all marked not active.
We didn't need them anymore so I deleted them then went to reapply.
Same error.
I tried to roll back to an earlier configuration snapshot - same error.
I went to an earlier snapshot - same error.
Restarted the nagios service (this is on RHEL 6.10 ) - same thing.
I removed the host I'd been trying to add and then ran apply - same thing.
I went to Config File Mangement and deleted then rewrote configs.
Verified files and got:
...
Total Warnings: 28
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
...
(The warnings are hosts/services with no contacts and services that are duplicated - we always have these and it's never prevented an apply)
Tried to run apply and got the same error.
I can force checks so it looks like everything is still monitoring - I just can't add or change anything until I get past this.
need assistance with configuration error
Re: need assistance with configuration error
ok ... this is weird
I ran /usr/local//nagiosxi/scripts/reconfigure_nagios.sh to see if I'd get something more and ... it gave me the same "warnings:28 erros:0 Things look OK" and looked like it went fine.
So I went back into the web interface and there was a new successful snapshot and 'Apply' was no longer red.
I clicked apply anyways - got the same error.
Went back to cli and reran the config - and got a new successful snapshot.
I ran /usr/local//nagiosxi/scripts/reconfigure_nagios.sh to see if I'd get something more and ... it gave me the same "warnings:28 erros:0 Things look OK" and looked like it went fine.
So I went back into the web interface and there was a new successful snapshot and 'Apply' was no longer red.
I clicked apply anyways - got the same error.
Went back to cli and reran the config - and got a new successful snapshot.
Re: need assistance with configuration error
Do you have by chance any files that are "left over" in the "/usr/local/nagios/etc/import/" directory? If you had "bad" confgis in the import directory, the apply configuration process would fail. You would need to delete them, then apply configuration.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: need assistance with configuration error
lmiltchev wrote:Do you have by chance any files that are "left over" in the "/usr/local/nagios/etc/import/" directory? If you had "bad" confgis in the import directory, the apply configuration process would fail. You would need to delete them, then apply configuration.
There are no files in the ./etc/import directory.
Re: need assistance with configuration error
So, when you are using the config file management, you are not getting any errors, and you can apply configuration - can you confirm?
Core Config Manager > Tools > Config File Management > Delete Files > Write Configs > Verify Files > Apply Configuration
Can you PM me your latest profile?
Admin > System Config > System Profile > Download Profile
Core Config Manager > Tools > Config File Management > Delete Files > Write Configs > Verify Files > Apply Configuration
Can you PM me your latest profile?
Admin > System Config > System Profile > Download Profile
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: need assistance with configuration error
lmiltchev wrote:So, when you are using the config file management, you are not getting any errors, and you can apply configuration - can you confirm?
Core Config Manager > Tools > Config File Management > Delete Files > Write Configs > Verify Files > Apply Configuration
Can you PM me your latest profile?
Admin > System Config > System Profile > Download Profile
If I go to Core Config Manager > Tools > Config File Management > and delete then write config files I can then Verify Files and I get:
---
Total Warnings: 28
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
---
If I then click the red Apply Configuration and then the Apply button I get the error.
I just went to Admin > System Config> System Profile > Download Profile and I get this:
---
PROFILE BUILD FAILED
Array
(
)
CODE: 1
---
Re: need assistance with configuration error
Try troubleshooting the profile issue by following the steps, outlined in this article:
https://support.nagios.com/kb/article/n ... d-533.html
Note: It is possible that fixing the sudoers will also fix the apply config issue. Try these steps again (after fixing sudoers):
Core Config Manager > Tools > Config File Management > Delete Files > Write Configs > Verify Files > Apply Configuration
If issue is still not resolved, PM me the profile, and we will go from there.
https://support.nagios.com/kb/article/n ... d-533.html
Note: It is possible that fixing the sudoers will also fix the apply config issue. Try these steps again (after fixing sudoers):
Core Config Manager > Tools > Config File Management > Delete Files > Write Configs > Verify Files > Apply Configuration
If issue is still not resolved, PM me the profile, and we will go from there.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: need assistance with configuration error
That did it!lmiltchev wrote:Try troubleshooting the profile issue by following the steps, outlined in this article:
https://support.nagios.com/kb/article/n ... d-533.html
Note: It is possible that fixing the sudoers will also fix the apply config issue. Try these steps again (after fixing sudoers):
Core Config Manager > Tools > Config File Management > Delete Files > Write Configs > Verify Files > Apply Configuration
If issue is still not resolved, PM me the profile, and we will go from there.
A policy change had shoved a new sudoers at this machine.
After fixing sudoers everything is working now.
TNX!!!