[rrd-users] RRDTOOL and custom data

Simon Hobson linux at thehobsons.co.uk
Wed Jan 22 14:48:05 CET 2014


franky <ffuino at gmail.com> wrote:

> I'm trying to use rrdtool to make some graphs. But it's not working as i
> wanted...
> 
> Here is the situation:
> 
> I have a file with data that are collected every 30 seconds but i can access
> this file only the day after. For example if i want to graph Tuesday data, i
> have to wait Wednesday morning. So what i have done is to create a new
> database with these information:
> 
> 
> 
> collected data:
> 
> 
> 
> generated a graph:
> 
> 
> 
> I have a graph with no line on it...
> 
> Is my rrd file creation false?

So you created an unspecified rrd file, did something unspecified, and the unspecified results don't look like the unspecified results you expected - and we're supposed to know what went wrong !


In general, there is no problem handling this sort of data collection - but there are some catches to be aware of. RRD doesn't actually care when teh data was collected, only the timestamp you give it when you update it. So there's no problem collecting data for a day, then inserting it into the RRD the next day - provided you have timestamps with the data. Basically the workflow goes something like this :

when a new file arrives : for each data entry, update the RRD using the timestamp that goes with the data

After this is done, any tools that access the data (graph, export, etc) will see the new data. So if you plot graphs, then during a day you'd see a bigger and bigger gap at the end due to missing data. Then once the next file has been inserted, the graphs will catch up. You don't ned to do anything special for plotting the graphs - other than allowing for the fact that you can expect missing data for some of the time.

If the data files themselves don't timestamp the data then you'll need to synthesise it somehow. Eg, you might work on the basis that the first record is at midnight and increase a counter by 30 for each subsequent record. In general this isn't reliable - what happens if the collection service is down for a short time ? You'll have gaps in the data but wouldn't know about it later and would time shift the following data to leave a gap at the end of the day.

The scripts for collecting, storing, and inserting the data are your responsibility.



More information about the rrd-users mailing list