Page 1 of 1

Database Maintenance is working or not

Posted: Mon Oct 25, 2021 1:50 pm
by ereut
Hello,

Running dbmaint_subsys.php gives output:
'PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/local/nagiosfusion/html/includes/components/fusioncore/fusioncore.inc.php on line 259'

head -n 3 dberrors.log
7: exec(): SQLSTATE[08S01]: Communication link failure: 1053 Server shutdown in progressSQL: [120] SELECT * FROM commands WHERE status_code = :status_code AND scheduled_time <= NOW() ORDER BY submission_time ASC LIMIT 1
Sent SQL: [109] SELECT * FROM commands WHERE status_code = 0 AND scheduled_time <= NOW() ORDER BY submission_time ASC LIMIT 1

Not sure the dbmaint_subsys.php output is okay or not, but disk space constantly increased by 1G per day (df -h, / used 39G now), which I assume script is not clean up the Fusion database. Fusion is polling 5 Cores, 1 XI, with totals of 186 hosts and 1190 services.

So, I'm wondering is database maintenance working or not?

Re: Database Maintenance is working or not

Posted: Tue Oct 26, 2021 10:58 am
by pbroste
Hello @ereut

Thanks for reaching out, want to take at the 'Fusion logs' so we can see what is going on.

Code: Select all

tar -cvzf /tmp/fusionlogs.tar.gz /usr/local/nagiosfusion/var/log/
Please [PM] these over to us when you get a chance.

Thanks,
Perry

Re: Database Maintenance is working or not

Posted: Tue Oct 26, 2021 11:36 am
by ereut
Hi Perry,

Sorry, can't compose [PM], I'm - '... just registered here and may need to participate more to be able to use this feature.'

I'm in touch with Greg Smith, Tech Support Engineer, I'll email zip file to him.

Thanks,
Eugene

Re: Database Maintenance is working or not

Posted: Tue Oct 26, 2021 4:59 pm
by pbroste
Hello Eugene

Thanks for getting the logs over to me. After review, I see the database errors that you are referring to and want to have you run through the database repair and then follow up with the updated logs.

Code: Select all

/usr/local/nagiosfusion/scripts/repair_databases.sh
Please let us know how things look.

Thanks,
Perry

Re: Database Maintenance is working or not

Posted: Wed Oct 27, 2021 11:07 am
by ereut
Hi Perry,

The output from ./repair_databases.sh is pretty scary:)
//--------------------------------------------------------------------------
Nagios Fusion
Repair Databases
****************

AUTOMATIC REPAIR UNAVAILABLE!

PLEASE CONTACT NAGIOS SUPPORT STAFF IMMEDIATELY!

Stopping the database...

Stopping the database succeeded.

It is suggested you leave the database in this state until you contact Nagios Support
//--------------------------------------------------------------------------

I remember that after installing Fusion, I ran the MySQL security script (mysql_secure_installation) and changed the root password, could this cause any problems?

Re: Database Maintenance is working or not

Posted: Wed Oct 27, 2021 2:09 pm
by pbroste
Hello @ereut

Yeah, I see that let's go ahead and run the database repair from command and let us know how things look after you bounce the services.

Code: Select all

 mysqlcheck -u root -pfusion --databases fusion mysql nagiosna
Thanks,
Perry

Re: Database Maintenance is working or not

Posted: Thu Oct 28, 2021 11:38 am
by pbroste
Hello @ereut

Thanks for following up, with the increase in disk space seems like 'crond' is running through rotation.

Let's restart:

Code: Select all

service crond restart
after that please run:

Code: Select all

service crond status
*Wait a few minutes for data to start updating.

Also, please upload your httpd log from:

Code: Select all

 /var/log/httpd/error_log
Let's increase set memory limit in:

Code: Select all

/etc/php.ini
Look for the line that saysmemory_limit = and double the number. For example; if you have 128M change it to 256M, if you have 256M change it to 512M.

After that restart apache

Code: Select all

service httpd restart
ereut wrote:Hi Perry,

So the good news is the disk space has decreased by 2G, now it is 37G. Still wondering why size is so big, or is 37G the norm for 1194 services in total?

The rest of news remains the same
dbmaint_subsys.php and and repair_databases.sh scripts works with same warning and scary message

/usr/local/nagiosfusion/cron# ./dbmaint_subsys.php
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/local/nagiosfusion/html/includes/components/fusioncore/fusioncore.inc.php on line 259

/usr/local/nagiosfusion/scripts# ./repair_databases.sh
....
AUTOMATIC REPAIR UNAVAILABLE! PLEASE CONTACT NAGIOS SUPPORT STAFF IMMEDIATELY!


Thanks,
Thanks,
Perry