Page 2 of 2

Re: Root File system getting full NagiosXI

Posted: Fri Feb 18, 2022 8:54 am
by gsmith
Hi

Here is my suggestion. Ultimately we want to get rid of those huge #sql files in /var/lib/mysql/nagiosxi. There
are a few in /var/lib/mysql/nagios and /var/lib/mysql/nagiosql, but we can deal with those later.

Code: Select all

service nagios stop
service npcd stop
service ndo2db stop
service mysqld stop
service httpd stop
service crond stop

mkdir /var/lib/mysql/nagiosxi_junk
mv /var/lib/mysql/nagiosxi/#sql*.frm /var/lib/mysql/nagiosxi_junk
mv /var/lib/mysql/nagiosxi/#sql*.ibd /var/lib/mysql/nagiosxi_junk

service crond start
service httpd start
service mysqld start
service ndo2db start
service npcd start
service nagios start
Verify the functionality of NagiosXI. Once you are comfortable that everything is functioning correctly then you can do:

Code: Select all

rm -rf /var/lib/mysql/nagiosxi_junk
to reclaim your diskspace.

Thanks!

Re: Root File system getting full NagiosXI

Posted: Fri Feb 18, 2022 10:21 am
by mejokj
Few questions

Will this remove the data of device already captured as we don't want to lose any data

Secondly, what may be reason for growing the sql file this much huge even if the table size is low

Any issue in configuration file? If yes it will happen again right?

Re: Root File system getting full NagiosXI

Posted: Fri Feb 18, 2022 10:42 am
by gsmith
Hi
Will this remove the data of device already captured as we don't want to lose any data
It shouldn't, but that is why I am being cautious and am having you move the files to
the /var/lib/mysql/nagiosxi_junk directory and validate Nagios before permanently
removing them.
Secondly, what may be reason for growing the sql file this much huge even if the table size is low
Those temp files are created during several operations, such as OPTIMIZE, ALTER.
If you crash, they can be left around.
If you want to try to find the root cause here are the dates that the files were created on:
Jan 16
Jan 17
Jan 18
Jan 19
Jan 28
Feb 4
Feb 10
Feb 11
Feb 12
Feb 13
Feb 14
Jun 6
Any issue in configuration file? If yes it will happen again right?
There doesn't seem to be any issue with the configuration.

Thanks