Page 1 of 2
Orphan services removal
Posted: Tue Jul 05, 2016 6:14 pm
by Naveed
Hello,
My few services are in unknown state, and showing the below error message
NSClient - ERROR: Invalid password.
I have checked all services, password is same for all but few are in unknown state, I have deleted those but still showing on nagios screen.
Screenshot is attached for verification.
Kindly assist.
Thank you!
Re: Orphan services removal
Posted: Tue Jul 05, 2016 6:21 pm
by Box293
Please follow the steps in this KB article and let us know if it solves your problem:
https://support.nagios.com/kb/article.php?id=27
Re: Orphan services removal
Posted: Tue Jul 05, 2016 6:46 pm
by Naveed
Thank you Box293
I have already checked this, but did not get a way to fix this issue.
Can you please suggest me anything else.
Much appreciated.
Thank you!
Re: Orphan services removal
Posted: Tue Jul 05, 2016 7:06 pm
by Box293
I suspect you have services that have been assigned to multiple hosts (usually using a hostgroup).
You can go into CCM and under services search for all the Uptime services. Edit one of them and click the "Manage Hosts" or "Manage Hostgroups" buttons to check what the service has been assigned to. Repeat until you find the offending service.
If it's not defined this way, the Hostgroups may be inherited by a template the service uses (or a template the template uses).
This command will give you a hint as to which file might be the cause of the issue:
Code: Select all
grep -B 2 -A 2 -R 'Uptime' /usr/local/nagios/etc/services/
Does this help?
Re: Orphan services removal
Posted: Tue Jul 05, 2016 7:17 pm
by Naveed
Great!
Really very helpful.
I checked by your suggested way and found that the service is only defined for one host and for hostgroup. If I would removed hostgroup from that service, it would not show on all hostgroup servers which I dont want.
I just dont want this service on only one server of this hostgroup.
How I can remove this, I have already checked in manage host and there is only one host added for it.
Kindly suggest.
Thank you
Re: Orphan services removal
Posted: Tue Jul 05, 2016 7:26 pm
by Box293
Re: Orphan services removal
Posted: Tue Jul 05, 2016 7:50 pm
by Naveed
I tried to edit the orphan service from nagios, it did not allow me to edit it and show the following screen
This service appears to make use of an advanced configuration using the Core Config Manager
Re: Orphan services removal
Posted: Tue Jul 05, 2016 7:53 pm
by Box293
Yes, you need to go into Configure > Core Configuration Manager > Monitoring > Services.
Re: Orphan services removal
Posted: Tue Jul 05, 2016 8:24 pm
by Naveed
Yes! I did the same.
But I am unable to see those services in list, and from service details as I tried to edit it but all in vain.
Kindly see the screenshots for further suggestions.
Thank you!
Re: Orphan services removal
Posted: Tue Jul 05, 2016 8:38 pm
by Box293
I'm confident that you have services that are assigned to multiple hosts.
You can go into CCM and under services search for all the 'CPU Usage' services. Edit one of them and click the "Manage Hosts" or "Manage Hostgroups" buttons to check what the service has been assigned to. Repeat until you find the offending service.
If it's not defined this way, the Hostgroups may be inherited by a template the service uses (or a template the template uses).
This command will give you a hint as to which file might be the cause of the issue:
Code: Select all
grep -B 2 -A 2 -R 'CPU Usage' /usr/local/nagios/etc/services/
Which will give you a hint as to which service in CCM you need to edit.
If this service is using hostgroups, then you need to make the changes to the service to exclude the hosts you don't want to receive this service (as explained in the other post). Otherwise remove the host from the hostgroup that the service is using.