Page 1 of 1
Archive Data from 2017 - 2018
Posted: Tue Aug 13, 2019 12:46 am
by sagesoft
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
Re: Archive Data from 2017 - 2018
Posted: Tue Aug 13, 2019 2:12 pm
by benjaminsmith
Hi
@brezner,
Is there a way we can delete/archive logs+data in nagios xi with specified date range.
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?
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.
Re: Archive Data from 2017 - 2018
Posted: Tue Aug 20, 2019 5:13 am
by sagesoft
Possibility of copying/archiving Nagios' data (historical) using another file format such as Excel? Dump the DB? with specified date?
Re: Archive Data from 2017 - 2018
Posted: Tue Aug 20, 2019 10:59 am
by benjaminsmith
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:
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
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:
Code: Select all
mysqldump -u root -pnagiosxi nagios nagios_statehistory nagios_logentries > archives.sql
To export by date range:
Code: Select all
mysqldump -u root -pnagiosxi --where="entry_time >='2019-08-18 14:28:34'" nagios nagios_logentries > logs.sql
Re: Archive Data from 2017 - 2018
Posted: Tue Aug 20, 2019 10:43 pm
by sagesoft
@benjaminsmith
Thank you very much for your help. You can now lock this thread.
Re: Archive Data from 2017 - 2018
Posted: Wed Aug 21, 2019 7:19 am
by scottwilkerson
brezner wrote:@benjaminsmith
Thank you very much for your help. You can now lock this thread.
Great
Locking