Page 1 of 1
/var is filling up quickly
Posted: Sun Nov 03, 2013 9:07 am
by ravish78
Team,
/var is filling up quickly. We find /var/lib/mysql/nagios is consuming most of space.
Is there any other alternative to get rid of this.Attached output.
We believe slave data comming through nrdp is filling up space quickly.
Any help is appreciated
Thanks
Ravi
Re: /var is filling up quickly
Posted: Mon Nov 04, 2013 10:41 am
by abrist
It looks like the "nagios_externalcommands" table is taking up the most space (which is potentially consistent with your suspicion of nrdp). You may want to turn off the logging of external commands by editing
/usr/local/nagios/etc/nagios.cfg:
Change:
To:
Restart Nagios:
Now you may want to truncate the externalcommands table to reclaim some space (WARNING! - This is destructive!):
Code: Select all
mysql -u ndoutils -pn@gweb nagios -e 'TRUNCATE TABLE nagios_externalcommands'
After truncation, repair the db:
Code: Select all
/usr/local/nagiosxi/scripts/repairmysql.sh nagios
Re: /var is filling up quickly
Posted: Mon Nov 04, 2013 12:26 pm
by ravish78
we are using nrdp to get the data from slave to master.
If we follow below process will it impact the data transfer or current setup
Re: /var is filling up quickly
Posted: Mon Nov 04, 2013 2:04 pm
by abrist
Setting log_external_commands=0 will just stop the commands from being logged. Truncating the nagios_externalcommands table will just remove older historical data from the table. Neither of these procedures should effect the monitoring configuration, just historical data.
Re: /var is filling up quickly
Posted: Mon Dec 09, 2013 10:00 am
by ravish78
we have moved nagios db from /var to /u01 to resolve this issue