Any recommendations for trimming Nagios XI MySQL Binary files? Can't find any documentation towards Nagios XI MySQL optimization, but they are slowly running me out of space
[f10000003j@vml1038 mysql]$ pwd
/var/lib/mysql
[f10000003j@vml1038 mysql]$ ll
total 3582328
-rw-r----- 1 mysql mysql 56 Sep 29 16:36 auto.cnf
-rw-r----- 1 mysql mysql 280551904 Nov 2 14:29 binlog.000009
-rw-r----- 1 mysql mysql 6225564 Nov 2 14:45 binlog.000010
-rw-r----- 1 mysql mysql 2019217 Nov 2 14:47 binlog.000011
-rw-r----- 1 mysql mysql 236650704 Nov 2 15:52 binlog.000012
-rw-r----- 1 mysql mysql 2517851 Nov 2 15:52 binlog.000013
-rw-r----- 1 mysql mysql 122368141 Nov 2 16:28 binlog.000014
-rw-r----- 1 mysql mysql 952233 Nov 2 16:28 binlog.000015
-rw-r----- 1 mysql mysql 16507546 Nov 2 17:00 binlog.000016
-rw-r----- 1 mysql mysql 459965645 Nov 3 10:02 binlog.000017
-rw-r----- 1 mysql mysql 37433739 Nov 3 10:59 binlog.000018
-rw-r----- 1 mysql mysql 112035273 Nov 3 11:17 binlog.000019
-rw-r----- 1 mysql mysql 7065819 Nov 3 11:20 binlog.000020
-rw-r----- 1 mysql mysql 179490421 Nov 3 15:32 binlog.000021
-rw-r----- 1 mysql mysql 16967083 Nov 3 15:58 binlog.000022
-rw-r----- 1 mysql mysql 717139075 Nov 4 18:25 binlog.000023
-rw-r----- 1 mysql mysql 460058317 Nov 5 11:35 binlog.000024
-rw-r----- 1 mysql mysql 702133953 Nov 6 09:33 binlog.000025
I added expire_logs_days=3 to /etc/my.cnf, but that doesn't appear to have taken affect if I'm looking at those dates right. There's some SQL queries for purging them, but I don't want to do anything not recommended for XI.
MySQL Binary Files
Re: MySQL Binary Files
The binlog_expire_logs_seconds can be decreased.
Edit the /etc/my.cnf.d/mysql-server.cnf file and add this line to the bottom.
binlog_expire_logs_seconds=86400
To purge the data, run this:
echo "PURGE BINARY LOGS BEFORE '2020-11-05 23:59:59';" |mysql -u root -pnagiosxi
There normally isn't a reason to keep these around for more than a day or so.
--Jeffrey
Edit the /etc/my.cnf.d/mysql-server.cnf file and add this line to the bottom.
binlog_expire_logs_seconds=86400
To purge the data, run this:
echo "PURGE BINARY LOGS BEFORE '2020-11-05 23:59:59';" |mysql -u root -pnagiosxi
There normally isn't a reason to keep these around for more than a day or so.
--Jeffrey
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: MySQL Binary Files
Cool so long as there's not much that NagiosXI needs with them then that works for me. Thank you!
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: MySQL Binary Files
Your welcome.Cool so long as there's not much that NagiosXI needs with them then that works for me. Thank you!
We'll go ahead and lock this thread, but feel free to open another if you have any new questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!