Archive Data from 2017 - 2018

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sagesoft
Posts: 28
Joined: Wed Aug 30, 2017 10:12 pm

Archive Data from 2017 - 2018

Post 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
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Archive Data from 2017 - 2018

Post 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.
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!
sagesoft
Posts: 28
Joined: Wed Aug 30, 2017 10:12 pm

Re: Archive Data from 2017 - 2018

Post by sagesoft »

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

Post 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
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!
sagesoft
Posts: 28
Joined: Wed Aug 30, 2017 10:12 pm

Re: Archive Data from 2017 - 2018

Post by sagesoft »

@benjaminsmith

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

Post by scottwilkerson »

brezner wrote:@benjaminsmith

Thank you very much for your help. You can now lock this thread.
Great

Locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked