Disk clean-up & purpose of /usr/local/nagiosxi/tmp

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Disk clean-up & purpose of /usr/local/nagiosxi/tmp

Post by TBT »

We recently experienced an issue where / was full and discovered /usr/local/nagiosxi/tmp had GBs of PDF reports, snmpwalk data, logs, etc dating back to 2017.

1. What is the purpose of /usr/local/nagiosxi/tmp?
2. Doesn't XI perform automatic housekeeping on /usr/local/nagiosxi/tmp?
3. We encounter a full drive issue at least annually, what is your recommendation for a clean-up checklist during such events?
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Disk clean-up & purpose of /usr/local/nagiosxi/tmp

Post by ssax »

1. Temporary files for XI (switch/router wizard temp files, reports, logs, etc)
2. No, it doesn't currently.
3. Check these:

Code: Select all

/store/backups/*
/usr/local/nagiosxi/tmp/*
/usr/local/nagios/var/*
/var/log/*
/var/log/snmptt/*
/var/spool/mail/*
I essentially just do this every time:

Code: Select all

cd /
du -sh *
cd large directory
du -sh *
cd next directory
du -sh *
keep doing it until you find what is eating the space
cd /
du -sh *
cd large director2
du -sh *
rinse, repeat
That's the most accurate way to do it that I'm aware, you can search for large files (google linux find large files) but this method is the most accurate as it could be a million tiny files consuming the space and this will show you where they reside.

If you have questions, just post them before deleting stuff you're unsure of for the nagios specific data.

Thank you
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Disk clean-up & purpose of /usr/local/nagiosxi/tmp

Post by TBT »

So it would be advisable to setup a cron to delete files order than 30 days from /usr/local/nagiosxi/tmp/ ?

eg:

Code: Select all

find /usr/local/nagiosxi/tmp/ -type f -mtime +30 -delete
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Disk clean-up & purpose of /usr/local/nagiosxi/tmp

Post by ssax »

Yeah, that should work, I would probably exclude these files from there though:

Code: Select all

components_api_versions.xml
configwizards_api_versions.xml
phpmailer.log
upgrade.log
See here:

https://superuser.com/questions/397307/ ... using-find
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Disk clean-up & purpose of /usr/local/nagiosxi/tmp

Post by TBT »

Why are those exclusion files in tmp if required?
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Disk clean-up & purpose of /usr/local/nagiosxi/tmp

Post by ssax »

They aren't required, I was having you save them for your (and our) benefit to help you debug if you have an issue. They should be recreated automatically.

Feel free to delete whatever you want in there.
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Disk clean-up & purpose of /usr/local/nagiosxi/tmp

Post by TBT »

Okay, I've excluded them anyway.

Thanks.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Disk clean-up & purpose of /usr/local/nagiosxi/tmp

Post by ssax »

Glad to hear it! Are we okay to lock this topic and mark it as resolved or do you have any related questions?
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Disk clean-up & purpose of /usr/local/nagiosxi/tmp

Post by TBT »

We're good. My script is taking care of clean-up now.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Locked