Disk Warning Message Root Partition

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Brooks
Posts: 36
Joined: Thu Dec 10, 2015 2:29 pm

Disk Warning Message Root Partition

Post by Brooks »

Hello,

I just started getting the following disk warning:

"DISK WARNING- free space: / 1483 MB (20% inode=81%):"

If I ssh in as root and do a df command I see the following info:

used=5735824
Available: 1518852
Use% 80

Do I need to worry at the moment and is there a command that could free up some of this space (i.e - logs, etc)?

Thanks in advance,
Bob
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Disk Warning Message Root Partition

Post by lmiltchev »

It is recommended that you take some action to make sure you are not going to run out of disk space on your Nagios XI server.

You can delete old logs in the "/var/log" directory and sub-directories. You can also delete whatever you don't need in the /tmp/" directory. Maybe you have some old backups that you can delete in "/store/backups/nagiosxi".

You could find the 10 largest files in the /var/log directory by running:

Code: Select all

du -a /var/log | sort -n -r | head -n 10
After you clear some room, add more disk space to your Nagios XI server. Please, review our Nagios XI - Resizing the VM Disk SIze" document here:

http://assets.nagios.com/downloads/nagi ... M_Disk.pdf

Note: Almost always, when you run out of disk space, you would end up with corrupted tables in the database, so you will need to run our database repair script, too.

http://assets.nagios.com/downloads/nagi ... tabase.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Brooks
Posts: 36
Joined: Thu Dec 10, 2015 2:29 pm

Re: Disk Warning Message Root Partition

Post by Brooks »

Sorry if this is a dumb question (not a Linux expert) - is it safe to purge any files inside the log folder (any files ending in .log)?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Disk Warning Message Root Partition

Post by tgriep »

If you are talking about the files in the /var/log folder, they should be removed automatically by the logrotate application which should be run daily by the cron daemon.
You can delete the logs in that folder that end with a date time stamp but over time that will be created again and the warning will happen again.
What is the size of the hard drive?
If it is small, you should expand the size as over time, the addition of new hosts and services will increase the disk usage.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Brooks
Posts: 36
Joined: Thu Dec 10, 2015 2:29 pm

Re: Disk Warning Message Root Partition

Post by Brooks »

Ya I think I need to increase the drive. Nagios provided the VM (you only give a 10GIG VM though). I do have this cloned so I will try to resize the partition tomorrow and let you know.

Thanks
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Disk Warning Message Root Partition

Post by rkennedy »

I'll leave this open - let us know how the expansion goes!
Former Nagios Employee
Brooks
Posts: 36
Joined: Thu Dec 10, 2015 2:29 pm

Re: Disk Warning Message Root Partition

Post by Brooks »

expansion went great. #df -h command verifies that the space is now only 48% in use. Only question is that Nagios still sees the old warning (even after doing an immediate recheck) - i'm assuming this warning goes away after a bit?

Thanks for your help.

Bob
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Disk Warning Message Root Partition

Post by lmiltchev »

Only question is that Nagios still sees the old warning (even after doing an immediate recheck) - i'm assuming this warning goes away after a bit?
This is strange - the status should change on immediate forced check... Can you run the following command on the Nagios XI server, and show the output?

Code: Select all

/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
Also, make sure you don't have any DB errors/crashed tables.

Code: Select all

service mysqld restart
tail /var/log/mysqld.log
or if you are using mariadb:

Code: Select all

service mariadb restart
tail /var/log/mariadb/mariadb.log
If you see any errors, run the DB repair script:

Code: Select all

cd /usr/local/nagiosxi/scripts
./repair_databases.sh
Be sure to check out our Knowledgebase for helpful articles and solutions!
Brooks
Posts: 36
Joined: Thu Dec 10, 2015 2:29 pm

Re: Disk Warning Message Root Partition

Post by Brooks »

disregard - the warning did go away so I'm good. I just have one more for you. I increased the VM hard disk size to 20GIG. So i'm assuming I should see a 20GIG partition from the #DF -h command. I see this listed as 13GIG (still gives me plenty of space which is nice) and just curious why this is not listed as a 20GIG? Even before I expanded this disk (the disk was a 10GIG volume) I only saw this listed as 7.7GIG. Any thoughts on this? Again not a big deal, just curious.

Thanks
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Disk Warning Message Root Partition

Post by rkennedy »

Yes, you should see the full 20G from a df -H. After you increased it to 20G on your hypervisor, did you run through the document to resize the partition?
http://assets.nagios.com/downloads/nagi ... M_Disk.pdf
Former Nagios Employee
Locked