i have create a rrd databasew (under php) with this code:
$opts = array( "--step", "60",
"DS:wattmin:GAUGE:300:0:8000",
"RRA:AVERAGE:0.5:1:2160",
"RRA:AVERAGE:0.5:5:2016",
"RRA:AVERAGE:0.5:15:2880",
"RRA:AVERAGE:0.5:60:8760",
"RRA:MIN:0.5:1:2160",
"RRA:MIN:0.5:5:2016",
"RRA:MIN:0.5:15:2880",
"RRA:MAX:0.5:60:8760",
"RRA:MAX:0.5:1:2160",
"RRA:MAX:0.5:5:2016",
"RRA:MAX:0.5:15:2880",
"RRA:MAX:0.5:60:8760");
$ret = rrd_create(RRD_DB_WP, $opts);
The image will be created like that:
$graphs=array("-6h","-12h","-1d","-1w","-1m","-1y");
$opts = array(
"-e now",
"--vertical-label=°C",
"-h 250",
"DEF:inoctets=".RRD_DB_WP.":wattmin:AVERAGE",
"AREA:inoctets#60B5E8:Watt/min",
"GPRINT:inbits:LAST:Las\: %4.0lfW",
"GPRINT:inbits:AVERAGE:Avg\: %4.0lfW",
"GPRINT:inbits:MAX:Max\: %4.0lfW\\n",
"DEF:grad8=".RRD_DB_TEMPS.":grad8:LAST",
"LINE2:grad8#F5A9A9:Wasser ",
"GPRINT:grad8:LAST:Las\: %2.1lf°C",
"GPRINT:grad8:AVERAGE:Avg\: %2.1lf°C",
"GPRINT:grad8:MIN:Min\: %2.1lf°C",
"GPRINT:grad8:MAX:Max\: %1.1lf°C\\n" );
$ret = rrd_graph(RRD_OUT_PATH. "/waermepumpe".$graph.".gif", $opts);
Everything works fine, but all data after 3 days are truncated and the created graphs after that time are always empty.
Bfo
If your graphs are showing no data past 3 days, then they may be being generated using the smaller RRA for some reason, which does not hold data back that far.
Possible reasons for this
rrdtool infoto verify the RRD file structure is as you expect.rrdtool dumpto view the content of the RRA and confirm there really is data stored.rrdtool tune) and though they now exist they do not have data