[pve-devel] adding a new value in rrd ?

Alexandre DERUMIER aderumier at odiso.com
Fri Jan 11 16:39:19 CET 2013


Hi,
I would like to known how to add a new value in rrds ?

I have added $template  value in pvestatd:

update_qemu_status{
 $data = "$d->{uptime}:$d->{name}:$ctime:$d->{cpus}:$d->{cpu}:" .
                "$d->{maxmem}:$d->{mem}:" .
                "$d->{maxdisk}:$d->{disk}:" .
                "$d->{netin}:$d->{netout}:" .
                "$d->{diskread}:$d->{diskwrite}:$template";

}

But I have an error on rrd update

rrdcached[2185]: queue_thread_main: rrd_update_r (/var/lib/rrdcached/db/pve2-vm/163) failed with status -1. (/var/lib/rrdcached/db/pve2-vm/163: found extra data on update argument: 1)


also, I look into rrd with rrdtool,
I see 10 values stored (maxcpu,cpu,maxmem,mem,maxdisk,disk,netin,netout,diskread,diskwrite)
 <row><v>xxx</v><v>xxx</v><v>xxx</v><v>xxx</v><v>xxx</v><v>xxx</v><v>xxx</v><v>xx</v><v>xxx</v><v>xxx</v></row>

But they are 13 values (14 with my new template values) in update_qemu_status.

Where are stored $d->{uptime}:$d->{name}:$ctime ?



More information about the pve-devel mailing list