X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fplugins%2Ftimeseries%2Frrdtool.c;h=7d6c30b68ff236d6b59dc417fce56706fe63dde0;hb=49b5a4d2e8e4fb1e4f67c2a368d8d2e3e76b765f;hp=db24903f5513785852a22748f05de88b1a4b0f91;hpb=8bbc16715bda6ba2cc32548e888e21c26e8299b1;p=sysdb.git diff --git a/src/plugins/timeseries/rrdtool.c b/src/plugins/timeseries/rrdtool.c index db24903..7d6c30b 100644 --- a/src/plugins/timeseries/rrdtool.c +++ b/src/plugins/timeseries/rrdtool.c @@ -47,7 +47,7 @@ SDB_PLUGIN_MAGIC; /* Current versions of RRDtool do not support multiple RRDCacheD client * connections. Use this to guard against multiple configured RRDCacheD * instances. */ -static _Bool rrdcached_in_use = 0; +static bool rrdcached_in_use = 0; /* * plugin API @@ -106,6 +106,10 @@ sdb_rrd_fetch(const char *id, sdb_timeseries_opts_t *opts, rrd_freemem(data); \ } while (0) + /* limit to about 1000 data-points for now + * TODO: make this configurable */ + step = (end - start) / 1000; + if (rrd_fetch_r(id, "AVERAGE", &start, &end, &step, &ds_cnt, &ds_namv, &data)) { char errbuf[1024];