Community discussions

MikroTik App
 
chrisd13
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Mon Feb 20, 2006 4:05 pm
Location: UK

Trimming of raw graphing data

Mon Jul 05, 2010 1:35 pm

Is there a way to trim old data from The Dude's new database? I had an issue where the db had hit the 2gb file limit and after a quick Vacuum its lowered the size by 200Mb, I will have to make adjustments to the data I am logging, but I now need to trim off old data from the tables to bring the db down to a lower size. If it can only be done with queries in SQLite, would anyone know the query required to do so as I don't really know too much about db architectures. Thx in advance.
 
lebowski
Forum Guru
Forum Guru
Posts: 1618
Joined: Wed Aug 27, 2008 5:17 pm

Re: Trimming of raw graphing data

Sun Jul 11, 2010 11:38 am

Add the graph to a chart, manually edit out the spike?
 
chrisd13
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Mon Feb 20, 2006 4:05 pm
Location: UK

Re: Trimming of raw graphing data

Sun Jul 11, 2010 3:26 pm

I wasn't aware you could edit the data from the graphs, I shall give it a go, thx :)
 
lebowski
Forum Guru
Forum Guru
Posts: 1618
Joined: Wed Aug 27, 2008 5:17 pm

Re: Trimming of raw graphing data

Mon Jul 12, 2010 7:09 am

I can't find the panel and it looks like they removed access to it in 4beta. I am certain you could do it in 3.6 but since it is now a database we should be able to figure out how this works. It would be really nice if they would publish the database structure...
 
chrisd13
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 68
Joined: Mon Feb 20, 2006 4:05 pm
Location: UK

Re: Trimming of raw graphing data

Mon Jul 12, 2010 6:06 pm

An interesting development. I have reduced all graph "Keep" durations to minimal amounts, I left it till the graphs updated with basic graphing, did a vacuum on the db and it reduced it to 50Mb, I then copied it over to my running Dude data folder and when I brought the service back online it expanded the db back up to 1.9Gb!! Can anyone @ Mikrotik clarify that the db will always try to run at full size and fill in the white space as it continues to commit data? If this is the case can anyone also tell me what the optimum "Keep" values for Raw, 10min, 2hour and 1day intervals are, as I get the feeling the "approximate size required" is not close to what it thinks it needs. As I originally raised my Raw data keep duration to 7d which caused the db to hit its limit.
 
lebowski
Forum Guru
Forum Guru
Posts: 1618
Joined: Wed Aug 27, 2008 5:17 pm

Re: Trimming of raw graphing data

Mon Jul 12, 2010 6:24 pm

I changed mine to 2 days for raw, 365 for 10 min, 3y for 2 hour, 10y for 1day. My approx storage size is 2114 KB. My database file is about 87Mb right now.

Who is online

Users browsing this forum: Google [Bot] and 12 guests