How do I cleanup the primary partition in NagiosXI?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
GacoAdmin110
Posts: 33
Joined: Mon Aug 31, 2015 1:30 pm

How do I cleanup the primary partition in NagiosXI?

Post 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-)
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

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

Post 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
Be sure to check out the Knowledgebase for helpful articles and solutions!
GacoAdmin110
Posts: 33
Joined: Mon Aug 31, 2015 1:30 pm

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

Post 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!
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

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

Post 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 -
Be sure to check out the Knowledgebase for helpful articles and solutions!
GacoAdmin110
Posts: 33
Joined: Mon Aug 31, 2015 1:30 pm

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

Post 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 :?:
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

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

Post 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
Be sure to check out the Knowledgebase for helpful articles and solutions!
GacoAdmin110
Posts: 33
Joined: Mon Aug 31, 2015 1:30 pm

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

Post 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!
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

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

Post 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?
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked