Page 1 of 2
Could not find a unique ID for this service
Posted: Wed Feb 03, 2021 10:29 pm
by nfv_nagios
Hi Support, i am trying to delete a service but received error "Could not find a unique ID for this service".
I have tried searching in CCM as well as /usr/local/nagios/etc/services for the particular service but not able to locate any. I have also tried performing database repair and did not get any errors.
I am running nagiosxi 5.4.
Can you advise how can i resolve this issue?
Re: Could not find a unique ID for this service
Posted: Thu Feb 04, 2021 3:08 pm
by dchurch
This error can happen if there are multiple records in the database that have the same service name and host. Run the following command and post the output to help me diagnose:
Code: Select all
mysql -h localhost -unagiosql -pn@gweb nagiosql <<< "select count(*) as ct, tbl_host.host_name, tbl_service.service_description from tbl_host inner join tbl_service on (tbl_host.id = tbl_service.host_name) group by tbl_host.host_name, tbl_service.service_description order by ct desc, host_name, service_description;"
Re: Could not find a unique ID for this service
Posted: Thu Feb 04, 2021 8:31 pm
by nfv_nagios
Hi Support, please see attached file for the output.
The problematic service that i was trying to delete is "Actual Memory usage"
ct host_name service_description
20 localhost Actual Memory usage
Re: Could not find a unique ID for this service
Posted: Fri Feb 05, 2021 10:12 am
by dchurch
If you PM me a system profile I can diagnose further. Get one by going to Admin (top menu) => System Profile (in the left menu), then clicking the blue button.
If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:
Code: Select all
rm -rf /usr/local/nagiosxi/var/components/profile*
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send me the resulting
/usr/local/nagiosxi/var/components/profile.zip file.
If the profile script fails, please include the ENTIRE output.
Re: Could not find a unique ID for this service
Posted: Mon Feb 08, 2021 1:29 am
by nfv_nagios
PM sent.
Re: Could not find a unique ID for this service
Posted: Mon Feb 08, 2021 12:15 pm
by benjaminsmith
Hi
@nfv_nagios,
Assisting with this post as Dan is out today. Sorry about the inconvenience, but can you send the PM once more to my account?
Thanks,
Benjamin
Re: Could not find a unique ID for this service
Posted: Mon Feb 08, 2021 8:31 pm
by nfv_nagios
PM sent.
Re: Could not find a unique ID for this service
Posted: Tue Feb 09, 2021 4:27 pm
by dchurch
Hi, can you run the following command on your Nagios XI machine:
Code: Select all
mysql -h localhost -unagiosql -pn@gweb nagiosql <<< "select count(*) as ct, tbl_service.config_name, tbl_service.service_description from tbl_host inner join tbl_service on (tbl_host.id = tbl_service.host_name) group by tbl_host.host_name, tbl_service.service_description order by ct desc, tbl_service.config_name, service_description;"
Re: Could not find a unique ID for this service
Posted: Tue Feb 09, 2021 9:27 pm
by nfv_nagios
Have PM you the requested info.
Re: Could not find a unique ID for this service
Posted: Wed Feb 10, 2021 12:28 pm
by dchurch
I'm able to see the "Actual Memory Usage" service you're referring to in the CCM under Services.
You will want to make sure the "Config Name" field is empty when you're on the list -- the field value is "sticky."
Screenshot 2021-02-10 112654.png