Page 3 of 3
Re: FUSION disk full 5-6 days after starting new server
Posted: Wed Apr 04, 2018 8:31 am
by tgriep
Can you open the nagiosfusion crontab file
Verify that this entry is in there
Code: Select all
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosfusion/cron/dbmaint_subsys.php >>/usr/local/nagiosfusion/var/log/dbmaint_subsys.log 2>&1
If not, add it and restart cron by running
Then see if it runs and that it truncates the MYSQL tables.
If the entry was there, let us know.
Re: FUSION disk full 5-6 days after starting new server
Posted: Wed Apr 04, 2018 12:00 pm
by dlukinski
tgriep wrote:Can you open the nagiosfusion crontab file
Verify that this entry is in there
Code: Select all
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosfusion/cron/dbmaint_subsys.php >>/usr/local/nagiosfusion/var/log/dbmaint_subsys.log 2>&1
If not, add it and restart cron by running
Then see if it runs and that it truncates the MYSQL tables.
If the entry was there, let us know.
line is there.
We've lost more free space since yesterday. How to cleanup?
[root@fikc-nagfsprod01 cron.d]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
37G 27G 8.8G 75% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/sda1 477M 122M 330M 27% /boot
/dev/sr0 56M 56M 0 100% /mnt
[root@fikc-nagfsprod01 cron.d]#
Re: FUSION disk full 5-6 days after starting new server
Posted: Wed Apr 04, 2018 1:35 pm
by tgriep
Thank you for reporting back what you found on the your server. I would like you to run the following commands on your server and post the /tmp/info.txt file.
Code: Select all
echo 'select * from options ;' |mysql -u fusion -pfusion fusion |grep reten >/tmp/info.txt
echo 'select * from polled_data;' |mysql -u fusion -pfusion fusion >>/tmp/info.txt
echo 'select polled_data_id from polled_extras;' |mysql -u fusion -pfusion fusion >>/tmp/info.txt
To truncate the database and shrink it, run the following as root
Code: Select all
cd /usr/local/nagiosfusion/scripts
./truncate_polled.php
echo 'OPTIMIZE TABLE polled_extras;' |mysql -u fusion -pfusion fusion
Re: FUSION disk full 5-6 days after starting new server
Posted: Wed Apr 04, 2018 4:07 pm
by dlukinski
tgriep wrote:Thank you for reporting back what you found on the your server. I would like you to run the following commands on your server and post the /tmp/info.txt file.
Code: Select all
echo 'select * from options ;' |mysql -u fusion -pfusion fusion |grep reten >/tmp/info.txt
echo 'select * from polled_data;' |mysql -u fusion -pfusion fusion >>/tmp/info.txt
echo 'select polled_data_id from polled_extras;' |mysql -u fusion -pfusion fusion >>/tmp/info.txt
To truncate the database and shrink it, run the following as root
Code: Select all
cd /usr/local/nagiosfusion/scripts
./truncate_polled.php
echo 'OPTIMIZE TABLE polled_extras;' |mysql -u fusion -pfusion fusion
Updated info.txt attached.
Thank you for truncation commands: worked.
[root@fikc-nagfsprod01 scripts]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
37G 3.3G 32G 10% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/sda1 477M 122M 330M 27% /boot
/dev/sr0 56M 56M 0 100% /mnt
Re: FUSION disk full 5-6 days after starting new server
Posted: Thu Apr 05, 2018 11:21 am
by tgriep
Thanks for the data.
Your system is keeping a lot of extra polled_data which in turn keeps extra polled_extra data so a new component was created to remove the older data that is not needed anymore.
To be safe, make a snapshot of the server in case you need to revert.
Attached to this post is a zip file called trimpolled.zip.
Save it to your desktop and go to the Admin > Manage Components menu in Fusion, browse to it and Upload it to the server.
Let the system run for 10 minutes and run the following as root.
Code: Select all
/usr/local/nagiosfusion/cron/dbmaint_subsys.php
This should automatically truncate and optimize the tables in the MYSQL database which should shrink them further.
Then, once a week, it will optimize the data when the script is ran so you will see the database increase a bit for a week then shrink again.
Let us know if it works and how much it shrinks the database.
Re: FUSION disk full 5-6 days after starting new server
Posted: Mon Apr 30, 2018 9:37 am
by dlukinski
tgriep wrote:Thanks for the data.
Your system is keeping a lot of extra polled_data which in turn keeps extra polled_extra data so a new component was created to remove the older data that is not needed anymore.
To be safe, make a snapshot of the server in case you need to revert.
Attached to this post is a zip file called trimpolled.zip.
Save it to your desktop and go to the Admin > Manage Components menu in Fusion, browse to it and Upload it to the server.
Let the system run for 10 minutes and run the following as root.
Code: Select all
/usr/local/nagiosfusion/cron/dbmaint_subsys.php
This should automatically truncate and optimize the tables in the MYSQL database which should shrink them further.
Then, once a week, it will optimize the data when the script is ran so you will see the database increase a bit for a week then shrink again.
Let us know if it works and how much it shrinks the database.
Believe this is now fully resolved.
Thank you so much for all the time spent!
Re: FUSION disk full 5-6 days after starting new server
Posted: Mon Apr 30, 2018 9:40 am
by eloyd
Glad we could all help you.
Re: FUSION disk full 5-6 days after starting new server
Posted: Mon Apr 30, 2018 1:42 pm
by tgriep
Your welcome. Glad to help. I'll close the post for you but if you have any issues or questions in the future, feel free to open a new post.