Page 1 of 1

How do I cleanup the primary partition in NagiosXI?

Posted: Thu Jan 19, 2017 12:01 pm
by GacoAdmin110
All,

I am looking for some solid instructions on how to cleanup the primary partition on my Nagios XI server.

I am running out of disk space, and I know there is a way I have seen floating around regarding how to properly clean old logs/files without breaking anything.

Thanks much!

8-)

Re: How do I cleanup the primary partition in NagiosXI?

Posted: Thu Jan 19, 2017 12:53 pm
by bwallace
Is your XI is on a physical server or VM?

This doc is written for XI + VM but applies to physical servers at least as a starting point:
Nagios XI - Running Out Of Disk Space On The Nagios XI VM
https://support.nagios.com/kb/article.php?id=26

If you're running XI in VM refer to our documentation on resizing the VM disk size
http://assets.nagios.com/downloads/nagi ... M_Disk.pdf

What specifically is hogging all the space?

Check whats in /var/log:
ls -l /var/log

You may delete some of the older logs - the ones with a number at the end, i.e. "messages.1", "messages.2", etc. You have to decide you you need to keep, and what you can delete.

Also check the httpd logs:
ls -l /var/log/httpd

Re: How do I cleanup the primary partition in NagiosXI?

Posted: Thu Jan 19, 2017 1:12 pm
by GacoAdmin110
bwallace wrote:Is your XI is on a physical server or VM?

This doc is written for XI + VM but applies to physical servers at least as a starting point:
Nagios XI - Running Out Of Disk Space On The Nagios XI VM
https://support.nagios.com/kb/article.php?id=26

If you're running XI in VM refer to our documentation on resizing the VM disk size
http://assets.nagios.com/downloads/nagi ... M_Disk.pdf

What specifically is hogging all the space?

Check whats in /var/log:
ls -l /var/log

You may delete some of the older logs - the ones with a number at the end, i.e. "messages.1", "messages.2", etc. You have to decide you you need to keep, and what you can delete.

Also check the httpd logs:
ls -l /var/log/httpd
OK thanks I will look at the articles. The above locations were the ones I was referring to so I will go look there first. I am running Nagios on VMware ESX.

Thnx!

Re: How do I cleanup the primary partition in NagiosXI?

Posted: Thu Jan 19, 2017 1:14 pm
by bwallace
You're welcome! We'll leave this thread open in case you run into any road blocks so do provide an update at some point - thanks -

Re: How do I cleanup the primary partition in NagiosXI?

Posted: Thu Jan 19, 2017 1:24 pm
by GacoAdmin110
bwallace wrote:You're welcome! We'll leave this thread open in case you run into any road blocks so do provide an update at some point - thanks -
Another dumb question on this...what is the actual command to delete one of the log files? I found the var/log to be very full, but now I need to learn how to actually clear it. The article doesn't give me the command syntax.

Thnx :?:

Re: How do I cleanup the primary partition in NagiosXI?

Posted: Thu Jan 19, 2017 1:41 pm
by bwallace
No worries, to delete a file just do :

rm <filename>

...that will prompt you, asking are you sure? for every file so to avoid that use -f (force) like so

rm -f <filename>

To delete multiple files ending with '.log' at once use *

rm -f *.log

Re: How do I cleanup the primary partition in NagiosXI?

Posted: Thu Jan 19, 2017 4:57 pm
by GacoAdmin110
bwallace wrote:No worries, to delete a file just do :

rm <filename>

...that will prompt you, asking are you sure? for every file so to avoid that use -f (force) like so

rm -f <filename>

To delete multiple files ending with '.log' at once use *

rm -f *.log
Thanks much for the help!

Re: How do I cleanup the primary partition in NagiosXI?

Posted: Fri Jan 20, 2017 10:11 am
by bwallace
You're welcome! Did you need to t-shoot this disk space issue further or are we good to lock this thread now?