[rrd-users] Little trouble with rrd_create_r

Alex van den Bogaerdt alex at ergens.op.het.net
Wed Jun 13 13:06:03 CEST 2007

On Wed, Jun 13, 2007 at 11:35:22AM +0100, Geoff Garside wrote:

> The errors I am getting when creating the RRDs is "expected 2 data source
> readings (got 1) from 0:". I've got my code printing out the equivalent
> `rrdtool create` command from the same arguments passed to the
> `rrd_create_r` function and it prints out the following

$ grep 'expected.*data source' *
Binary file librrd_th_la-rrd_update.o matches
Binary file rrdupdate matches
rrd_update.c:       rrd_set_error("expected timestamp not found in data source from %s:...",
rrd_update.c:       rrd_set_error("expected %lu data source readings (got %lu) from %s:...",
Binary file rrd_update.o matches

In other words: there's no way this error message is generated while
creating your database.

Check your update routines.  Try not calling rrd if your input
data is incomplete; see if rrdtool still complains (probably not!)
Do not assume snmpget (or -walk, or whatever) returns data. Verify
this.  Before calling "rrdtool update ${rrd} ${timestamp}:${data}",
verify that these variables contain something useful. And do write
those commands to a file for debugging purposes (make sure timestamp
is numeric, not "N").

Alex van den Bogaerdt

More information about the rrd-users mailing list