Page 1 of 1

Nagios DB issue

Posted: Wed Nov 24, 2021 2:51 am
by Stuff-Nagios
Hi Team,

We are facing DB error continuously and prompting to run repair script.
After running the repair script, it works but with in minutes again the error is recurring.

Attach the error and system profile.

Please provide us the permanent solution.

Regards
Uday Kumar

Re: Nagios DB issue

Posted: Wed Nov 24, 2021 10:18 am
by gsmith
Hi

When you run the repair do you get any indication of which table(s)
needed repair?

Thanks

Re: Nagios DB issue

Posted: Mon Nov 29, 2021 1:54 am
by Stuff-Nagios
Hi,

We are not receiving any particular table name to repair. But once we run the script, few tables are getting fixed.

Please find the attached notepad for the tables fixing while running the script.

Regards
Uday Kumar Bandi

Re: Nagios DB issue

Posted: Mon Nov 29, 2021 4:59 pm
by benjaminsmith
Hi,

Let's convert the database engine to Innodb, it will be less prone to crashing.

However, before doing that, make sure to take a full backup and then set up regularly scheduled backups (if you do not have this configured already).

See: Backing Up And Restoring Your Nagios XI System

Then follow the steps in the knowledgebase article below to change the storage engine on the nagios database.

Database Storage Engine and High CPU usage in Nagios XI

--Benjamin

Re: Nagios DB issue

Posted: Mon Dec 13, 2021 8:04 am
by Stuff-Nagios
Hi Team,
Even after performing all steps, still issue not resolved.
Db issue recurring.

Regards
Uday Kumar Bandi

Re: Nagios DB issue

Posted: Mon Dec 13, 2021 4:58 pm
by benjaminsmith
HI Uday,

Can you send me the current system profile after making those changes? I'd like to take a closer look at the system log files. Thanks, Benjamin

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button

Re: Nagios DB issue

Posted: Tue Dec 14, 2021 1:03 am
by Stuff-Nagios
Hi,

Uploading nagios profile.

Regards
Uday Kumar Bandi


Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.

Re: Nagios DB issue

Posted: Tue Dec 14, 2021 3:23 pm
by benjaminsmith
Hi Uday,

I'm seeing a higher load in the top command output but the database log is not showing corrupt tables now. I did catch the following error.

Code: Select all

 PHP Warning:  mysqli::mysqli(): (08004/1040): Too many connections in /usr/local/nagiosxi/html/includes/components/ccm/classes/db.class.php on line
Please follow the steps in the kb article below to increase the max connections on the database.

Nagios XI - MySQL/MariaDB - Max Connections

And let me know if you notice any improvement.

Regards,
Benjamin

Re: Nagios DB issue

Posted: Sun Dec 19, 2021 11:32 pm
by Stuff-Nagios
Hi,

After changing the max connections and open files limit, DB issue resolved automatically.
But after a day, again the issue came up on console. Need to fix asap. Please help us to resolve.

Regards
Uday Kumar Bandi

Re: Nagios DB issue

Posted: Mon Dec 20, 2021 12:06 pm
by benjaminsmith
Hi,

Let's move this over to a support ticket to troubleshoot this further.

https://support.nagios.com/tickets/

Please reference this post and provide an updated system profile in the ticket.

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button


Thanks,
Benjamin