Page 1 of 1
Deleted service still showing in UI and exists in the DB
Posted: Wed Apr 12, 2017 4:08 pm
by nthaler
Hi NagiosXI team!
I have a service we deleted the other week but check still seem to be running for it. It shows up under critical services but it no longer showing through the CCM. CCM does not think it exists. But if I view the config file I see the entry is there. The entry in our DB still exists.
I made sure we do not have duplicate nagios instances running. (Had that issue before)
What do we need to do to remove this service since I cannot use the CCM? I cannot edit the config file directly since all of those changes are automatically removed.
Thank you!
Re: Deleted service still showing in UI and exists in the DB
Posted: Wed Apr 12, 2017 4:30 pm
by tmcdonald
What database is it showing up in? There are three DBs we use, nagios for the running config, nagiosql for the CCM, and nagiosxi for the interface (users, dashboards, etc.).
Did you make sure to do an Apply Config after deleting it? If that was not done, it will remain.
Re: Deleted service still showing in UI and exists in the DB
Posted: Wed Apr 12, 2017 5:40 pm
by nthaler
We found it in the 'nagios' DB. We have applied the config and made other changes that worked fine since we deleted this through the CCM. This actualyl happened about 3 weeks ago, just had other things on my plate. We were still able to disable notifications even though it didn't delete properly. But it is going to mess up my reporting going forward.
select * from nagios_services where display_name='wavmbe109 webapp ac - mycologia-ac.highwire.org'
==>
service_id: 13328402
instance_id: 1
config_type: 1
host_object_id: 1103
service_object_id: 6059
display_name: wavmbe109 webapp ac - mycologia-ac.highwire.org
importance: 0
check_command_object_id: 1442
check_command_args: mycologia-ac.highwire.org!/runtime/monitor!'overall-status="OK"'!!!!!
eventhandler_command_object_id: 0
eventhandler_command_args:
notification_timeperiod_object_id: 125
check_timeperiod_object_id: 125
failure_prediction_options:
check_interval: 5
retry_interval: 2
max_check_attempts: 5
first_notification_delay: 0
notification_interval: 10
notify_on_warning: 0
notify_on_unknown: 1
notify_on_critical: 1
notify_on_recovery: 1
notify_on_flapping: 0
notify_on_downtime: 0
stalk_on_ok: 0
stalk_on_warning: 0
stalk_on_unknown: 0
stalk_on_critical: 0
is_volatile: 0
flap_detection_enabled: 1
flap_detection_on_ok: 1
flap_detection_on_warning: 1
flap_detection_on_unknown: 1
flap_detection_on_critical: 1
low_flap_threshold: 0
high_flap_threshold: 0
process_performance_data: 1
freshness_checks_enabled: 0
freshness_threshold: 0
passive_checks_enabled: 1
event_handler_enabled: 1
active_checks_enabled: 1
retain_status_information: 1
retain_nonstatus_information: 1
notifications_enabled: 0
obsess_over_service: 1
failure_prediction_enabled: 0
notes:
notes_url:
action_url:
icon_image:
icon_image_alt:
Re: Deleted service still showing in UI and exists in the DB
Posted: Thu Apr 13, 2017 12:43 pm
by tmcdonald
It's entirely possible that the service is defined elsewhere in the CCM under a different config name - have you tried a DB search for that? It would be in the
nagiosql database, something like this:
Code: Select all
use nagiosql;
select * from tbl_service where service_description='wavmbe109 webapp ac - mycologia-ac.highwire.org';
Otherwise it is possible it got removed from the CCM but the config file was never updated - have you tried deleting just that entry from the config file and restarting Core? Do that, then check the
nagios database again.
Also, just for kicks, what is the output of
ipcs -q on your server?
Re: Deleted service still showing in UI and exists in the DB
Posted: Thu Apr 13, 2017 1:43 pm
by nthaler
Removing the service as root and restarting nagios via the CLI seems to have worked.
FYI
The service was not present in the nagiosql DB and the ouptup of icps -q is below.
# ipcs -q
------ Message Queues --------
key msqid owner perms used-bytes messages
0xf403004d 1310720 nagios 600 7168 7
I think we are good now.
Re: Deleted service still showing in UI and exists in the DB
Posted: Thu Apr 13, 2017 1:51 pm
by cdienger
Glad to hear. Did you want us to lock the thread at this point or did you have any more questions?