Page 1 of 1

Nagios showing services as hosts

Posted: Tue Mar 26, 2024 3:35 pm
by apiedrakamai
Hi In my nagios UI, there seem to some sort of "corruption" when you go to "host status summary" and click on "All" at the end of the list I see the name of services listed as hosts, but then when I click on the name of one of this services it shows Object not found.

I've trying to figure out how to remove it from there but have no idea.
Any idea is appreciated.

Nagios version: 5.11.1

Thanks

Re: Nagios showing services as hosts

Posted: Tue Mar 26, 2024 4:25 pm
by jmichaelson
You may have to go into the Core Configuration Manager (CCM, Configure->Core Config Manager) to clean up the hosts. I'd be interested in seeing both what the CCM shows and the process you followed to get the hosts into services.

Also, I noticed you're still on 5.11.1. I'd also recommend after you've got this resolved, upgrading to Nagios XI 2024R1.x.

Re: Nagios showing services as hosts

Posted: Wed Mar 27, 2024 10:41 am
by apiedrakamai
Hi,

thanks for the reply, but forgot to post that as well when I go to Core Configuration Manager only my hosts are listed those services do not show up, that is the weird thing, they show up in the host summary but not in hosts in CCM, Configure->Core Config Manager

Re: Nagios showing services as hosts

Posted: Thu Apr 11, 2024 4:18 pm
by ajcoil
Hi @apiedrakamai!

I would recommend attempting a database repair to see if that resolves your issue.

Log into your Nagios XI server and run the following command as root:

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
If you still have any questions or issues, feel free to reach out!

Re: Nagios showing services as hosts

Posted: Fri Apr 26, 2024 7:11 pm
by apiedrakamai
I ran /usr/local/nagiosxi/scripts/repair_databases.sh but did not help much still showing the same information, in fact this kind of ghost entries keep increasing.

Any other idea?

Re: Nagios showing services as hosts

Posted: Mon Apr 29, 2024 9:24 am
by gwesterman
Hi @apiedrakamai,

I have a few clarifying questions:
1. Are the hosts and services both correct in the CCM? You mentioned that the services aren't "showing up" in the CCM. Are you referring to the services that shouldn't be showing up, or do you have no services showing in the CCM?
2. Are the corrupted services all on a certain host? Or is it happening for every service in your system?
3. The corrupted services are genuine services, correct? The issue is that the interface seems to think they are hosts? Are they being listed as both hosts and services or only as hosts?

Thank you!

Re: Nagios showing services as hosts

Posted: Thu May 02, 2024 6:13 pm
by apiedrakamai
updates on this:

- Upgraded nagios to the latest version and prior that I had to run a repairmysql
- Upgrade went fine but still this ghost entries.

@gwesterman services in the services section they are OK, the problem is in the host summary, where you see all the listed host you have in Nag when I go there, there are services showing as hosts.

I will attach a new image on how it looks, but it basically a blank spot pointing to a service but if you click on it it says does not exist.

Re: Nagios showing services as hosts

Posted: Fri May 03, 2024 9:14 am
by gwesterman
You may have a corrupted MYSQL database. Try running the following:

Code: Select all

systemctl stop nagios
echo 'truncate nagios_hoststatus; truncate nagios_hosts; truncate nagios_services; truncate nagios_servicestatus; truncate nagios_servicechecks; truncate nagios_hostchecks; truncate nagios_downtimehistory; truncate nagios_commenthistory;' | mysql -u root -pnagiosxi nagios
systemctl start nagios
Let us know if this works.

Thank you!

Re: Nagios showing services as hosts

Posted: Tue May 07, 2024 12:36 pm
by apiedrakamai
@gwesterman you did it!! that fixed my issue.

I will save this if ever happens to me again!! appreciate it