FUSION disk full 5-6 days after starting new server

This support forum board is for questions relating to Nagios Fusion.
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: FUSION disk full 5-6 days after starting new server

Post by tgriep »

Can you open the nagiosfusion crontab file

Code: Select all

/etc/cron.d/nagiosfusion
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

Code: Select all

service crond restart
Then see if it runs and that it truncates the MYSQL tables.

If the entry was there, 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: FUSION disk full 5-6 days after starting new server

Post by dlukinski »

tgriep wrote:Can you open the nagiosfusion crontab file

Code: Select all

/etc/cron.d/nagiosfusion
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

Code: Select all

service crond restart
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]#
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: FUSION disk full 5-6 days after starting new server

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: FUSION disk full 5-6 days after starting new server

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: FUSION disk full 5-6 days after starting new server

Post 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.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: FUSION disk full 5-6 days after starting new server

Post 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!
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: FUSION disk full 5-6 days after starting new server

Post by eloyd »

Glad we could all help you.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: FUSION disk full 5-6 days after starting new server

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked