[rrd-users] RRD File Not Being Created (linux, RRDTool 1-1.3.1, rrdlib, c++)
Robert Easton
mark63 at azurebell.co.nz
Wed Jul 30 01:47:36 CEST 2008
Hi,
When I call rrd_create in my program it returns 0 and there is no error set
(rrd_get_error()). Yet the rrd files are not created. I have checked folder
permissions and they are fine. I have run the "rrdtool create" command from
command line, using the same parameters and that works fine.
Also, I had to move the DS parameter to the last position in the array. When
I had it before the RRA parameters rrd_get_error() returned that there was
not a data source declared. That is strange also.
So, why is my c++ app not creating any files and why did I have to move the
DS to the last array position? This code snippet shows what I am doing:
char start_time_s[50];
long start_time;
int ret;
start_time = (long)time (NULL);
sprintf (start_time_s, "%ld", start_time);
char *opts[] = { _rrd_file_path, "--start", start_time_s, "--step", "60",
"RRA:AVERAGE:0.5:1:10080", "RRA:MIN:0.5:1:10080",
"RRA:MAX:0.5:1:10080", "RRA:LAST:0.5:1:10800",
"RRA:AVERAGE:0.5:60:4464", "RRA:MIN:0.5:60:4464",
"RRA:MAX:0.5:60:4464", "RRA:LAST:0.5:60:4464",
"RRA:AVERAGE:0.5:1440:365", "RRA:MIN:0.5:1440:365",
"RRA:MAX:0.5:1440:365", "RRA:LAST:0.5:1440:365",
"DS:sensor:GAUGE:120:U:U" };
ret = rrd_create( 18, opts);
if (ret == -1)
stdout << rrd_get_error();
Cheers,
Mark
--
View this message in context: http://www.nabble.com/RRD-File-Not-Being-Created-%28linux%2C-RRDTool-1-1.3.1%2C-rrdlib%2C-c%2B%2B%29-tp18723481p18723481.html
Sent from the RRDTool - User mailing list archive at Nabble.com.
More information about the rrd-users
mailing list