Filesystem VAR 96% full

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
allenwallach
Posts: 28
Joined: Wed Jun 20, 2012 8:30 am

Filesystem VAR 96% full

Post by allenwallach »

We have the following issue:

usa0300lv591.na.xerox.net(wu53266)df -h /var/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol01
3.9G 3.6G 174M 96% /var
usa0300lv591.na.xerox.net(wu53266)uname -a
Linux usa0300lv591.na.xerox.net 2.6.18-274.17.1.el5 #1 SMP Wed Jan 4 22:45:44 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

Attempt to clean up:

We do not have sufficient privileges to reduce the /var space. We not even having the permissions to determine which directory/file are consuming more space.

usa0300lv591.na.xerox.net(srao):/var$ pwd
/var
usa0300lv591.na.xerox.net(srao):/var$ du -sh log
du: cannot read directory `log/audit': Permission denied
du: cannot read directory `log/puredisk': Permission denied
du: cannot read directory `log/samba': Permission denied
du: cannot read directory `log/httpd': Permission denied
du: cannot read directory `log/ppp': Permission denied
du: cannot read directory `log/rootsh': Permission denied
du: cannot read directory `log/squid': Permission denied


Please find results below which are consuming maximum space in /var filesystem.

-rw-rw---- 1 mysql mysql 789M Jan 21 07:54 /var/lib/mysql/ndowdc1/nagios_servicechecks.MYD
-rw-rw---- 1 mysql mysql 182M Jan 21 07:54 /var/lib/mysql/ndowdc1/nagios_servicechecks.MYI
-rw-rw---- 1 mysql mysql 237M Jan 21 07:54 /var/lib/mysql/ndowdc1/nagios_logentries.MYD
-rw-rw---- 1 mysql mysql 135M Jan 21 07:54 /var/lib/mysql/ndowdc1/nagios_hostchecks.MYD
usa0300lv591.na.xerox.net(root)uname -a
Linux usa0300lv591.na.xerox.net 2.6.18-274.17.1.el5 #1 SMP Wed Jan 4 22:45:44 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

The above are data files and can not be reduced. How we can migrate the data files to /u01
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Filesystem VAR 96% full

Post by mguthrie »

First: you'll need to be the root user in order to view information under /var

Those files by themselves aren't enough to fill up your hard drive, but you can reduce them by reducing the threshold for saved data in the Admin->Performance->Database(tab). Those tables store historical information for Nagios.

Some files to look at would be:
/var/spool/mail/root
/var/log (anything that ends with .log.1 log.2 etc is an old log and can be deleted.)

Is this running on a virtual machine? If so you can look into resizing the partition.
http://assets.nagios.com/downloads/nagi ... M_Disk.pdf
Locked