Hi Support Team;
Is there a way we can delete/archive logs+data in nagios xi with specified date range.
As per checking this link: https://support.nagios.com/kb/article/n ... a-812.html it will delete all logs+data and only supported in 5.5 and later. The Current version of our Nagios XI is 5.4.11.
Thank you
Archive Data from 2017 - 2018
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Archive Data from 2017 - 2018
Hi @brezner,
To limit the duration of historical data stored in the database go to Admin > System Config > Performance Settings > Databases (see Nagios XI Database Optimization for more details ).
Lastly, please make a backup of your system before making any changes.
Currently, that's not supported in 5.4.11 or the latest version. However, I'd by happy to submit a feature request on your behalf to the development team. What data ranges do you need to remove and for what purpose?Is there a way we can delete/archive logs+data in nagios xi with specified date range.
To limit the duration of historical data stored in the database go to Admin > System Config > Performance Settings > Databases (see Nagios XI Database Optimization for more details ).
Lastly, please make a backup of your system before making any changes.
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: Archive Data from 2017 - 2018
Possibility of copying/archiving Nagios' data (historical) using another file format such as Excel? Dump the DB? with specified date?
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Archive Data from 2017 - 2018
Hi @brezner,
Thanks for the input. I just submitted a feature request. Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.
As explained in the kb article you referenced, the historical data is stored in the nagios database in the following tables:
If you want to export this data, you can use the msqldump command. Below are a few example commands.
To export data by tables from the nagios database:
To export by date range:
Thanks for the input. I just submitted a feature request. Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.
As explained in the kb article you referenced, the historical data is stored in the nagios database in the following tables:
Code: Select all
nagios_acknowledgements
nagios_commenthistory
nagios_comments
nagios_downtimehistory
nagios_flappinghistory
nagios_logentries
nagios_objects
nagios_notifications
nagios_processevents
nagios_statehistory
nagios_timedevents
To export data by tables from the nagios database:
Code: Select all
mysqldump -u root -pnagiosxi nagios nagios_statehistory nagios_logentries > archives.sql
Code: Select all
mysqldump -u root -pnagiosxi --where="entry_time >='2019-08-18 14:28:34'" nagios nagios_logentries > logs.sql
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: Archive Data from 2017 - 2018
@benjaminsmith
Thank you very much for your help. You can now lock this thread.
Thank you very much for your help. You can now lock this thread.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Archive Data from 2017 - 2018
Greatbrezner wrote:@benjaminsmith
Thank you very much for your help. You can now lock this thread.
Locking