Search code examples
databaserrdtoolrrd

Is rrdtool also suitable for data analysis?


I use rrdtool to store bandwidth, cpu load and temperature metrics and graph them nicely.

But I want to perform some analysis on that stored data, ie resample it to a minute boundry (I'm sampling every 5 seconds) and then use this data to see if a certain device started consuming a certain type of bandwidth category (gaming or video) and trigger a script when that happens. Each category for each device is a rdd file by itself. This would require some other language like Python interacting with the stored data, ie polling every minute (resampling to the minute) on the rdd file and checking if a condition is met.

This is trivial in SQL, just do a SELECT or a find/aggregate in MongoDB, but how do I go about this in rrdtool?

Is rrdtool also designed to do this, or mainly to do the graphing stuff?

I really like it for the compactness of the stored files.


Solution

  • you can grab preprocessed data from rrd databases using the PRINT command in the graphv function or you can export data that would go into a graph using the xport function. both will allow you to resample the data and apply rpn scripts.