/var is filling up quickly

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

/var is filling up quickly

Post 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
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: /var is filling up quickly

Post 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:

Code: Select all

log_external_commands=1
To:

Code: Select all

log_external_commands=0
Restart Nagios:

Code: Select all

service nagios restart
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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: /var is filling up quickly

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: /var is filling up quickly

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ravish78
Posts: 269
Joined: Wed Mar 14, 2012 9:50 am

Re: /var is filling up quickly

Post by ravish78 »

we have moved nagios db from /var to /u01 to resolve this issue
Locked