Ghost host(s)/ db corruption? - Cannot apply configuration
Ghost host(s)/ db corruption? - Cannot apply configuration
Have an issue with a ghost host. Applying configuration errors out stating that host has invalid max_check_attempts. Even, after deleting host from front end and back end, recreating the host, verify configuration, delete configuration, verify config have all proved failures and the error still shows up.
Error: Invalid max_check_attempts value for host
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/.cfg', starting on line 16)
I resolved this temporarily by rolling back to a previous configuration before the error had occurred as far as I know. Recreated the hosts and it worked for about a week.
Unsure if related, but the issue seems to start up after I have been using the linux snmp wizard, after attempting to add new host (unrelated to the ones that throw the error), the same invalid configuration shows up for the host (described in the beginning) that was deleted and recreated. Which leads me to believe something in the database is bringing back the error.
Please assist. Thank you for your time and assistance.
Error: Invalid max_check_attempts value for host
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/.cfg', starting on line 16)
I resolved this temporarily by rolling back to a previous configuration before the error had occurred as far as I know. Recreated the hosts and it worked for about a week.
Unsure if related, but the issue seems to start up after I have been using the linux snmp wizard, after attempting to add new host (unrelated to the ones that throw the error), the same invalid configuration shows up for the host (described in the beginning) that was deleted and recreated. Which leads me to believe something in the database is bringing back the error.
Please assist. Thank you for your time and assistance.
Re: Ghost host(s)/ db corruption? - Cannot apply configurati
Hi,
Please dump the nagiosql db:
Then share the file in a private message and reply to this post as this will
bring it up in the queue which will make us aware the file has been uploaded.
Thanks
Please dump the nagiosql db:
Code: Select all
mysqldump -uroot -pnagiosxi nagiosql > /tmp/nagiosql.dumpbring it up in the queue which will make us aware the file has been uploaded.
Thanks
Re: Ghost host(s)/ db corruption? - Cannot apply configurati
PM sent. Bumping post.
Re: Ghost host(s)/ db corruption? - Cannot apply configurati
Hi,
Thanks for the db file, I was able to load it successfully.
Can you please tell me which host is causing the problems?
You can tell me in a PM if you want to keep the hostname private.
Thanks
Thanks for the db file, I was able to load it successfully.
Can you please tell me which host is causing the problems?
You can tell me in a PM if you want to keep the hostname private.
Thanks
Re: Ghost host(s)/ db corruption? - Cannot apply configurati
agofusqazoo02 and agofusqazoo03. These were the ones that would say they had the max_check_attempts parameter blank and could not read the host cfg file. However, even after removing these completely through deleting through the UI as well as rm -f in the backend to the host cfg file, the error would still show up when trying to apply configuration and even if the hosts did not exist, which leads me to believe some sort of db issue.
Re: Ghost host(s)/ db corruption? - Cannot apply configurati
Hi
Could you please try the following and let me know the results:
If that doesn't solve anything then I will do what you did:
Thanks
Could you please try the following and let me know the results:
Code: Select all
Choose Configure, Core Config Manager
Under Tools in the left-hand menu select Config File Management
Hit the "Delete Files" (red) button - it's OK to do this
Hit the "Write Configs" (blue) button
Optional but informative - hit the "Verify Files" (white button)
In the left-hand menu under Quick Tools select Apply Configuration
Click the "Apply Configuration" (blue) buttonand then I will look through the database.removing these completely through deleting through the UI as well as rm -f in the backend to the host cfg file
Thanks
Re: Ghost host(s)/ db corruption? - Cannot apply configurati
Already did that previously but did it again. Same thing: Delete, write, verify configuration all say successful. Then, when applying configuration, the same max_interval_checks errors for the same host(s) whether it exists are not still popping up.
The last time I was able to "fix" was to rollback to a configuration from a previous week and recreated the error-laden hosts. Configuration was able to apply. Worked well until (not sure if related) I added a linux snmp device from the configuration wizard. After trying to create and apply configuration, the error popped up again for the ghost host.
Please look into the db and what can be done to fix this corruption. Thank you.
The last time I was able to "fix" was to rollback to a configuration from a previous week and recreated the error-laden hosts. Configuration was able to apply. Worked well until (not sure if related) I added a linux snmp device from the configuration wizard. After trying to create and apply configuration, the error popped up again for the ghost host.
Please look into the db and what can be done to fix this corruption. Thank you.
Re: Ghost host(s)/ db corruption? - Cannot apply configurati
Please run this tail command (and leave it running):
Then try to apply configuration through the web interface and once it errors send us the full output from the tail command above.
Please PM (Private Message) one of us a copy of your profile.zip as well, you can download it from Admin > System Profile by clicking the Download Profile button.
Code: Select all
tail -Fn0 /usr/local/nagiosxi/var/cmdsubsys.logPlease PM (Private Message) one of us a copy of your profile.zip as well, you can download it from Admin > System Profile by clicking the Download Profile button.
Re: Ghost host(s)/ db corruption? - Cannot apply configurati
Requested files sent in PM.
Re: Ghost host(s)/ db corruption? - Cannot apply configurati
While not likely related, I see this:
The actual issue:
Try removing the files from /usr/local/nagios/etc/import, Apply Configuration, and let us know the results:
I would also upgrade to XI 5.8.7 when you get a chance to get the latest NDO3 fixes.
What is the output of this command?PHP Warning: file_put_contents(/usr/local/nagiosxi/var/components/auditlog.log): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/utils-auditlog.inc.php on line 145
Code: Select all
ls -l /usr/local/nagiosxi/var/components/auditlog.logCode: Select all
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/VvsmFseU.tmp.cfg .. ERROR
Duplicate entry 'agoxxxxxxr01.xxxxx.org-1' for key 'config_name'Entry host_name::agoxxxxxxr01.xxxxx.org inside tbl_host could not be inserted: 1<br>Code: Select all
rm -rf /usr/local/nagios/etc/import/*.cfg