Unable to upgrade Nagios Fuson

This support forum board is for questions relating to Nagios Fusion.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Unable to upgrade Nagios Fuson

Post by dlukinski »

tgriep wrote:There was a bug fixed in version 4.1.0 of Fusion that fixed the issue of the MYSQL database that would grow to a very large size.
Here is the entry from the changelog.
Added fix for large mysql ibdata files -BH
So after you upgrade the server, that should be fixed.

The large log files, I would have to see the log rotate file from the server so can you post the following file.

Code: Select all

/etc/logrotate.d/nagiosfusion
And the output of this command run as root

Code: Select all

ls -l /usr/local/nagiosfusion/var/log/
What version of Fusion is the server currently running?
This is version 4.0.1

Is there way to cleanup DB or should we re-spin FUSION all over again?
- I cannot assign more space and see no point in doing so because this is a product problem fixed in newer version
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to upgrade Nagios Fuson

Post by tgriep »

If you still want to upgrade the existing server, try doing this.
Stop the server from collecting new data. Run this as root to do that.

Code: Select all

service crond stop
pkill -u nagios
Then run this as root to truncate and optimize the MYSQL database.

Code: Select all

echo 'TRUNCATE TABLE polled_data;' | mysql -u fusion -pfusion fusion
echo 'TRUNCATE TABLE polled_averages;' | mysql -u fusion -pfusion fusion
echo 'TRUNCATE TABLE polled_deltas;' | mysql -u fusion -pfusion fusion
echo 'TRUNCATE TABLE polled_extras;' | mysql -u fusion -pfusion fusion

echo 'OPTIMIZE TABLE polled_data;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_averages;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_deltas;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_extras;' | mysql -u fusion -pfusion fusion

Delete the old log files from the server in this folder

Code: Select all

/usr/local/nagiosfusion/var/log/
Then run the Fusion upgrade and after it finishes, reboot the server so all of the services can startup again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Unable to upgrade Nagios Fuson

Post by dlukinski »

tgriep wrote:If you still want to upgrade the existing server, try doing this.
Stop the server from collecting new data. Run this as root to do that.

Code: Select all

service crond stop
pkill -u nagios
Then run this as root to truncate and optimize the MYSQL database.

Code: Select all

echo 'TRUNCATE TABLE polled_data;' | mysql -u fusion -pfusion fusion
echo 'TRUNCATE TABLE polled_averages;' | mysql -u fusion -pfusion fusion
echo 'TRUNCATE TABLE polled_deltas;' | mysql -u fusion -pfusion fusion
echo 'TRUNCATE TABLE polled_extras;' | mysql -u fusion -pfusion fusion

echo 'OPTIMIZE TABLE polled_data;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_averages;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_deltas;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_extras;' | mysql -u fusion -pfusion fusion

Delete the old log files from the server in this folder

Code: Select all

/usr/local/nagiosfusion/var/log/
Then run the Fusion upgrade and after it finishes, reboot the server so all of the services can startup again.
No changes to the disk space

So essentially this version has no solution and we were misinformed by the support back in December
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to upgrade Nagios Fuson

Post by tgriep »

Without knowing how many servers that are fused and the number of checks on each server, it is hard to give an exact number on how much storage is needed for your server.

Lets try and force the truncate to see if the tables can be shrunk.
Run the following as root

Code: Select all

echo 'TRUNCATE TABLE polled_data;' | mysql -u fusion -pfusion fusion -f
echo 'TRUNCATE TABLE polled_averages;' | mysql -u fusion -pfusion fusion -f
echo 'TRUNCATE TABLE polled_deltas;' | mysql -u fusion -pfusion fusion -f
echo 'TRUNCATE TABLE polled_extras;' | mysql -u fusion -pfusion fusion -f
echo 'OPTIMIZE TABLE polled_data;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_averages;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_deltas;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_extras;' | mysql -u fusion -pfusion fusion
Then, run the following and post the /tmp/info.txt file to the post so I can see the space used on the server and the size of the database.

Code: Select all

df -h >/tmp/info.txt
df -i >>/tmp/info.txt
ls -lR /var/lib/mysql >>/tmp/info.txt
Be sure to check out our Knowledgebase for helpful articles and solutions!
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Unable to upgrade Nagios Fuson

Post by dlukinski »

tgriep wrote:Without knowing how many servers that are fused and the number of checks on each server, it is hard to give an exact number on how much storage is needed for your server.

Lets try and force the truncate to see if the tables can be shrunk.
Run the following as root

Code: Select all

echo 'TRUNCATE TABLE polled_data;' | mysql -u fusion -pfusion fusion -f
echo 'TRUNCATE TABLE polled_averages;' | mysql -u fusion -pfusion fusion -f
echo 'TRUNCATE TABLE polled_deltas;' | mysql -u fusion -pfusion fusion -f
echo 'TRUNCATE TABLE polled_extras;' | mysql -u fusion -pfusion fusion -f
echo 'OPTIMIZE TABLE polled_data;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_averages;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_deltas;' | mysql -u fusion -pfusion fusion
echo 'OPTIMIZE TABLE polled_extras;' | mysql -u fusion -pfusion fusion
Then, run the following and post the /tmp/info.txt file to the post so I can see the space used on the server and the size of the database.

Code: Select all

df -h >/tmp/info.txt
df -i >>/tmp/info.txt
ls -lR /var/lib/mysql >>/tmp/info.txt

info file attached
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to upgrade Nagios Fuson

Post by tgriep »

Thanks for the data. The only way I found to shrink the ibdata1 data file that MYSQL uses it to dump the database, stop MYSQL, delete the file and restore the database.

I can create a procedure for you but I would so get some information from the Fusion server.
Can you post your /etc/my.cnf file and any file in the /etc/my.cnf.d folder if any exists?
Run this as root and post it.

Code: Select all

mysql --version
Or you can spin up a new server.

Let me know how you want to proceed.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Unable to upgrade Nagios Fuson

Post by dlukinski »

tgriep wrote:Thanks for the data. The only way I found to shrink the ibdata1 data file that MYSQL uses it to dump the database, stop MYSQL, delete the file and restore the database.

I can create a procedure for you but I would so get some information from the Fusion server.
Can you post your /etc/my.cnf file and any file in the /etc/my.cnf.d folder if any exists?
Run this as root and post it.

Code: Select all

mysql --version
Or you can spin up a new server.

Let me know how you want to proceed.
We'll spin a new one

Thank you
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to upgrade Nagios Fuson

Post by tgriep »

Your welcome. If you have any other questions, let us know.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Unable to upgrade Nagios Fuson

Post by dlukinski »

tgriep wrote:Your welcome. If you have any other questions, let us know.

Re-spinned and operational. Please close the case
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to upgrade Nagios Fuson

Post by scottwilkerson »

Glad to hear it is resolved. Closing
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked