Page 1 of 1

Nagios XI errors

Posted: Wed Mar 20, 2024 10:43 am
by bancoatlas
Hi there.

I got a situation with my Nagios XI. It ran out of memory I the administrator not knowing this executed several times the repair database script. After giving more disk space, and perfoming a lot of rescue procedures such as copy a dump of the mariaDB table to it because it did not find any more (nagiosxi.auditlogs) now I seem to work OK. but I got some issues.

Image 1
Image 1.jpeg
When viewing the hosts, for example, the name of another host that has nothing to do with it appears in parentheses.

Image 2
Image 2.jpeg
However when you enter it looks good

Image 3
Image 3.jpeg
Unnamed services, when trying to see the graph the same thing as the ping graph appears. If you look at Status information it has a strange IP

When searching in the CCM, that service without a name does not appear, nor does it appear searching by IP

Image 4
Image 4.jpeg
weird things like this

Image 5
Image 5.jpeg
This, for example, is a random service. upon entering it says that the object does not exist

Thank you very much in advance.

Best Regards

Re: Nagios XI errors

Posted: Wed Mar 20, 2024 4:16 pm
by swolf
Hi @bancoatlas, thanks for reaching out.

This is probably going to be something where you want to Open a Case with the Support team proper - they'll be able to look at the specifics of your environment and debug with you.

That said, here's where I'd start:

1) Confirm that your CCM definitions are what you think they are

You've mentioned a few things where i.e. IP addresses don't match up to hostnames. The "source of truth" for this sort of thing is at Configure->Core Config Manager (CCM). If you can look at some affected hosts and services, and make sure there isn't a problem in the CCM's definitions, that's a good first thing to eliminate. For the issue you're facing, I would check that, for instance, Host Name and alias and address all correspond to each other on your affected hosts.

2) Once you're sure the CCM is okay, go to CCM->Tools->Config File Management and then run:
- Delete Files
- Write Config
- Verify Files

This will make sure that the configuration files used by the Nagios Core daemon have the correct information.

3) Once you've done that, we'll want to stop the monitoring engine and truncate some tables.

Please only truncate these tables; changing others may make some of your reports incorrect.

Code: Select all

systemctl stop nagios
. /usr/local/nagiosxi/etc/xi-sys.cfg
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 -p$mysqlpass nagios
systemctl start nagios
Hopefully that helps! After all of that, your host and service detail pages should start to regenerate over time. If you still see issues after this, you'll want to open a case.

Re: Nagios XI errors

Posted: Thu Mar 21, 2024 2:07 pm
by antorres
Hi there,

Thank you very much, @swolf, for your help! The procedure to truncate these tables worked very well.

Just to inform everyone, I deleted (after creating a backup of the folder nagios/etc) all hosts, services, and other data on the Nagios XI server. However, even after that, I still encountered some services and hosts with strange names.

Following your suggestion, I then performed a truncate operation on certain tables.

Finally, I imported all configurations in the correct order.

Now everything works very well, Allthough I lost historical data.

Best Regards

Re: Nagios XI errors

Posted: Thu Mar 21, 2024 2:09 pm
by bancoatlas
Thank you once again @swolf