From: Mrten <mrt...@ii...> - 2013-05-17 10:09:09
|
There is a bug in GraphOld.pm triggered by the trimming in get_field_name() in GraphOld.pm that fucks up generating DEFs when the variable name is > 15 characters: multigraph mysql_wsrep_avgwritesetbytes graph_args --base 1000 --no-gridfit --slope-mode graph_title Galera writesets average bytes graph_category mysql wsrep_replicated.draw LINE1 wsrep_replicated.min 0 wsrep_replicated.type DERIVE wsrep_replicated.graph no wsrep_received.draw LINE1 wsrep_received.min 0 wsrep_received.type DERIVE wsrep_received.graph no wsrep_replicated_bytes.draw LINE1 wsrep_replicated_bytes.min 0 wsrep_replicated_bytes.type DERIVE wsrep_replicated_bytes.graph no wsrep_received_bytes.draw LINE1 wsrep_received_bytes.min 0 wsrep_received_bytes.type DERIVE wsrep_received_bytes.graph no wsrep_avgreplicated.cdef wsrep_replicated_bytes,wsrep_replicated,/ wsrep_avgreplicated.draw LINE1 wsrep_avgreplicated.min 0 wsrep_avgreplicated.label average size of sent writeset wsrep_avgreplicated.type DERIVE wsrep_avgreceived.cdef wsrep_received_bytes,wsrep_received,/ wsrep_avgreceived.draw LINE1 wsrep_avgreceived.min 0 wsrep_avgreceived.label average size of received writeset wsrep_avgreceived.type DERIVE generated 'DEF:awsrep_received=/var/lib/munin/virtual/database-3-mysql_wsrep_avgwritesetbytes-wsrep_received-d.rrd:42:MAX' \ 'DEF:iwsrep_received=/var/lib/munin/virtual/database-3-mysql_wsrep_avgwritesetbytes-wsrep_received-d.rrd:42:MIN' \ 'DEF:gwsrep_received=/var/lib/munin/virtual/database-3-mysql_wsrep_avgwritesetbytes-wsrep_received-d.rrd:42:AVERAGE' \ 'CDEF:a510ac46cd6faa32=awsrep_replicated_bytes,awsrep_replicated,/' \ 'CDEF:i510ac46cd6faa32=iwsrep_replicated_bytes,iwsrep_replicated,/' \ 'CDEF:g510ac46cd6faa32=gwsrep_replicated_bytes,gwsrep_replicated,/' \ (notice missing DEFs) Now, if I change the 15's in this function to '115' (255 would be better, that's rrdtool's limit on vnames): sub get_field_name { my $name = shift; $name = substr(Digest::MD5::md5_hex($name), -15) if (length $name > 15); return $name; } I get a graph that works. I realize it's a hack, but there's probably a few hard to find bugs here regarding variable name consistency in CDEFs (see also bugs 1017 and 578: http://munin-monitoring.org/ticket/578 ) M. |