From a CLI please run:
Code: Select all
echo " SELECT logentry_time FROM nagios_logentries ORDER BY logentry_time ASC LIMIT 1;" | mysql -u root -pnagiosxi nagiosBy default the settings in NagiosXI are:
Max Audit Log Age = 180 days
So if you are ok with keeping 180 days of log entries you can run the following on the CLI:
Code: Select all
mysqldump -u root -pnagiosxi nagios nagios_logentries | gzip > /tmp/nagios_logentries.sql.gz
echo "DELETE FROM nagios_logentries WHERE logentry_time < NOW() - INTERVAL 180 DAY" | mysql -u root -pnagiosxi nagiosroom on the filesystem.
The second command will remove entries older than 180 days from the nagios.nagios_logentries table.
Please let me know the results.
Thanks