Page 1 of 1
NAGIOS XI - Not possible to delete items (Hosts/Services)
Posted: Wed Jan 05, 2022 10:25 am
by RalfS
Good day,
we have the following problem/issue concerning the administration of NAGIOS XI:
a) Whenever we want to „apply configuration“ (after making some changes like try to delete a host etc) there will always come an
errorcode (independent which action before was done: try to delete a service etc):
First Errormessage:
+
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.
+
Second Errormessage:
+
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/service/SERVER - PING.cfg', starting on line 16)
+
Do you know/ can yo assist which could be the reason for this? (as presently we cannot delete or add hosts/services etc.)
Many thanks beforehand for your help!
Re: NAGIOS XI - Not possible to delete items (Hosts/Services
Posted: Wed Jan 05, 2022 1:46 pm
by pbroste
Hello
@RalfS
Thanks for reaching and want have you run through a reindex on the Core Configs.
- rm -rf /usr/local/nagios/etc/import/*
- Command list all running /bin/nagios -> ps -aux | grep -E '/bin/nagios'
- Command -> killall -9 nagios (or pkill nagios)
- Nagios XI web console
==> Core Configuration Manager (CCM)
==> Config File Management
==> [Delete Files]
==> [Write Files]
==> [Verify Files]
- 6: Core Configuration Manager (CCM)
==> Under Quick Tools
==> "Apply Configuration"
- 7: Restart nagios.service by Command: systemctl restart nagios
[list]
[/list]
Verify that the host and services look good in pre-flight with no errors in core by:
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Please PM your updated system profile if the issue persists.
To send us your system profile.
- Login to the Nagios XI GUI using a web browser.
- Click the "Admin" > "System Profile" Menu
- Click the "Download Profile" button
- Save the profile.zip file and send via Private Message
Thanks,
Perry
Re: NAGIOS XI - Not possible to delete items (Hosts/Services
Posted: Thu Jan 06, 2022 8:30 am
by RalfS
Good day,
many thanks for your help in this matter!
As i want to send you the profile.zip via private message i am not able to do so.
What will be then the best way to send this to you?
Many thanks beforehand again for your help!
Regards
Re: NAGIOS XI - Not possible to delete items (Hosts/Services
Posted: Fri Jan 07, 2022 10:31 am
by pbroste
Hello
@RalfS
Thanks for follow up, here is the command to get the System Profile.
Code: Select all
rm -rf /usr/local/nagiosxi/var/components/profile.zip
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send the resulting /usr/local/nagiosxi/var/components/profile.zip file via Private Message.
Thanks,
Perry
Re: NAGIOS XI - Not possible to delete items (Hosts/Services
Posted: Fri Jan 07, 2022 11:13 am
by WillH
Dollars to donuts, my guess, is that you have a service that someone set up without completing or broke
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/service/SERVER - PING.cfg', starting on line 16)
To test this theory
Purge the import folder as suggested above.
Then in the CCM, find the service 'SERVER - PING.cfg' and set it to inactive, then try to apply changes.
If that works, open up that service and make sure that it's configured properly with a valid check command, a valid description and that it is associated with at least one host, host group or service group. While in there make sure the check intervals, notifactions and everything else are all "up to code".
Once it's corrected, reactivate and apply changes again.
What may happen is that you're still unable to apply changes, but the error will reference another cfg file. Do the same trouble shooting. Hopefully you won't need to play whack-a-mole for too long.
Re: NAGIOS XI - Not possible to delete items (Hosts/Services
Posted: Fri Jan 07, 2022 2:29 pm
by pbroste
Excellent, write-up with suggestion please let us know how things are looking.
WillH wrote:Dollars to donuts, my guess, is that you have a service that someone set up without completing or broke
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/service/SERVER - PING.cfg', starting on line 16)
To test this theory
Purge the import folder as suggested above.
Then in the CCM, find the service 'SERVER - PING.cfg' and set it to inactive, then try to apply changes.
If that works, open up that service and make sure that it's configured properly with a valid check command, a valid description and that it is associated with at least one host, host group or service group. While in there make sure the check intervals, notifactions and everything else are all "up to code".
Once it's corrected, reactivate and apply changes again.
What may happen is that you're still unable to apply changes, but the error will reference another cfg file. Do the same trouble shooting. Hopefully you won't need to play whack-a-mole for too long.