munin
munin copied to clipboard
munin graph unable to graph with negative due to improper cdef order
munin-2.0.28
just another surprise, I original thought my little plugin can be done in few days, but I trigger bugs everywhere ...
the graph called GPRINT before the proper CDEF
munin graph log
2016/12/17 13:23:37 [RRD ERROR] Unable to graph /var/lib/munin/cgi-tmp/munin-cgi-graph/localhost/localhost/yazol_zfs_stats_efficiency_cnt-day.png : undefined vname cc43ccf39
2016/12/17 13:23:37 [RRD ERROR] rrdtool 'graph' '/var/lib/munin/cgi-tmp/munin-cgi-graph/localhost/localhost/yazol_zfs_stats_efficiency_cnt-day.png' \
'--title' \
'ZFS ARC Efficiency by access - by day' \
'--start' \
'-2000m' \
'--lower-limit' \
'0' \
'--slope-mode' \
'--height' \
'175' \
'--width' \
'400' \
'--imgformat' \
'PNG' \
'--font' \
'DEFAULT:0:DejaVuSans,DejaVu Sans,DejaVu LGC Sans,Bitstream Vera Sans' \
'--font' \
'LEGEND:7:DejaVuSansMono,DejaVu Sans Mono,DejaVu LGC Sans Mono,Bitstream Vera Sans Mono,monospace' \
'--color' \
'BACK#F0F0F0' \
'--color' \
'FRAME#F0F0F0' \
'--color' \
'CANVAS#FFFFFF' \
'--color' \
'FONT#666666' \
'--color' \
'AXIS#CFD6F8' \
'--color' \
'ARROW#CFD6F8' \
'--border' \
'0' \
'-W' \
'Munin 2.0.28' \
'DEF:a_ba6dfa7=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_ba6dfa7-d.rrd:42:MAX' \
'DEF:i_ba6dfa7=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_ba6dfa7-d.rrd:42:MIN' \
'DEF:g_ba6dfa7=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_ba6dfa7-d.rrd:42:AVERAGE' \
'DEF:a_a8d4ed8=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_a8d4ed8-d.rrd:42:MAX' \
'DEF:i_a8d4ed8=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_a8d4ed8-d.rrd:42:MIN' \
'DEF:g_a8d4ed8=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_a8d4ed8-d.rrd:42:AVERAGE' \
'DEF:a_1b9302f=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_1b9302f-d.rrd:42:MAX' \
'DEF:i_1b9302f=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_1b9302f-d.rrd:42:MIN' \
'DEF:g_1b9302f=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_1b9302f-d.rrd:42:AVERAGE' \
'DEF:ac43ccf39=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-c43ccf39-d.rrd:42:MAX' \
'DEF:ic43ccf39=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-c43ccf39-d.rrd:42:MIN' \
'DEF:gc43ccf39=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-c43ccf39-d.rrd:42:AVERAGE' \
'DEF:a_c59698a=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_c59698a-d.rrd:42:MAX' \
'DEF:i_c59698a=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_c59698a-d.rrd:42:MIN' \
'DEF:g_c59698a=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_c59698a-d.rrd:42:AVERAGE' \
'DEF:a_00ffdd8=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_00ffdd8-d.rrd:42:MAX' \
'DEF:i_00ffdd8=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_00ffdd8-d.rrd:42:MIN' \
'DEF:g_00ffdd8=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-_00ffdd8-d.rrd:42:AVERAGE' \
'DEF:af6c19979=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-f6c19979-d.rrd:42:MAX' \
'DEF:if6c19979=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-f6c19979-d.rrd:42:MIN' \
'DEF:gf6c19979=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-f6c19979-d.rrd:42:AVERAGE' \
'DEF:ae183b2fc=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-e183b2fc-d.rrd:42:MAX' \
'DEF:ie183b2fc=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-e183b2fc-d.rrd:42:MIN' \
'DEF:ge183b2fc=/var/lib/munin/localhost/localhost-yazol_zfs_stats_efficiency_cnt-e183b2fc-d.rrd:42:AVERAGE' \
'CDEF:ce183b2fc=ge183b2fc' \
'COMMENT: ' \
'COMMENT:Cur (-/+)' \
'COMMENT:Min (-/+)' \
'COMMENT:Avg (-/+)' \
'COMMENT:Max (-/+) \j' \
'AREA:ge183b2fc#00CC00:Demand Data Hits ' \
'GPRINT:cc43ccf39:LAST:%6.2lf%s/\g' \
'GPRINT:ce183b2fc:LAST:%6.2lf%s' \
'GPRINT:ic43ccf39:MIN:%6.2lf%s/\g' \
'GPRINT:ie183b2fc:MIN:%6.2lf%s' \
'GPRINT:gc43ccf39:AVERAGE:%6.2lf%s/\g' \
'GPRINT:ge183b2fc:AVERAGE:%6.2lf%s' \
'GPRINT:ac43ccf39:MAX:%6.2lf%s/\g' \
'GPRINT:ae183b2fc:MAX:%6.2lf%s\j' \
'CDEF:cf6c19979=gf6c19979' \
'STACK:gf6c19979#0066B3:Demand Metadata Hits ' \
'GPRINT:c91b9302f:LAST:%6.2lf%s/\g' \
'GPRINT:cf6c19979:LAST:%6.2lf%s' \
'GPRINT:i91b9302f:MIN:%6.2lf%s/\g' \
'GPRINT:if6c19979:MIN:%6.2lf%s' \
'GPRINT:g91b9302f:AVERAGE:%6.2lf%s/\g' \
'GPRINT:gf6c19979:AVERAGE:%6.2lf%s' \
'GPRINT:a91b9302f:MAX:%6.2lf%s/\g' \
'GPRINT:af6c19979:MAX:%6.2lf%s\j' \
'CDEF:c_00ffdd8=g_00ffdd8' \
'STACK:g_00ffdd8#FF8000:Prefetch Data Hits ' \
'GPRINT:c0a8d4ed8:LAST:%6.2lf%s/\g' \
'GPRINT:c_00ffdd8:LAST:%6.2lf%s' \
'GPRINT:i0a8d4ed8:MIN:%6.2lf%s/\g' \
'GPRINT:i_00ffdd8:MIN:%6.2lf%s' \
'GPRINT:g0a8d4ed8:AVERAGE:%6.2lf%s/\g' \
'GPRINT:g_00ffdd8:AVERAGE:%6.2lf%s' \
'GPRINT:a0a8d4ed8:MAX:%6.2lf%s/\g' \
'GPRINT:a_00ffdd8:MAX:%6.2lf%s\j' \
'CDEF:c_c59698a=g_c59698a' \
'STACK:g_c59698a#FFCC00:Prefetch Metadata Hits ' \
'GPRINT:c4ba6dfa7:LAST:%6.2lf%s/\g' \
'GPRINT:c_c59698a:LAST:%6.2lf%s' \
'GPRINT:i4ba6dfa7:MIN:%6.2lf%s/\g' \
'GPRINT:i_c59698a:MIN:%6.2lf%s' \
'GPRINT:g4ba6dfa7:AVERAGE:%6.2lf%s/\g' \
'GPRINT:g_c59698a:AVERAGE:%6.2lf%s' \
'GPRINT:a4ba6dfa7:MAX:%6.2lf%s/\g' \
'GPRINT:a_c59698a:MAX:%6.2lf%s\j' \
'CDEF:cc43ccf39=gc43ccf39' \
'CDEF:c_1b9302f=g_1b9302f' \
'CDEF:c_a8d4ed8=g_a8d4ed8' \
'CDEF:c_ba6dfa7=g_ba6dfa7' \
'CDEF:re_zero=gc43ccf39,UN,0,0,IF' \
'CDEF:ngc43ccf39=gc43ccf39,-1,*' \
'AREA:ngc43ccf39#00CC00' \
'CDEF:ng91b9302f=g91b9302f,-1,*' \
'STACK:ng91b9302f#0066B3' \
'CDEF:ng0a8d4ed8=g0a8d4ed8,-1,*' \
'STACK:ng0a8d4ed8#FF8000' \
'CDEF:ng4ba6dfa7=g4ba6dfa7,-1,*' \
'STACK:ng4ba6dfa7#FFCC00' \
'STACK:ng4ba6dfa7#FFCC00' \
'LINE1:re_zero#000000' \
'VRULE:1481952000#999999' \
'COMMENT:Last update\: Sat Dec 17 13\:20\:00 2016\r' \
'--end' \
'1481952000'
2016/12/17 13:23:37 [DEBUG] Graphed service localhost;localhost:yazol_zfs_stats_efficiency_cnt (0.01 sec for 1 graphs)
2016/12/17 13:23:37 [WARNING] Could not draw graph "/var/lib/munin/cgi-tmp/munin-cgi-graph/localhost/localhost/yazol_zfs_stats_efficiency_cnt-day.png": /var/lib/munin/cgi-tmp/munin-cgi-graph/localhost/localhost/yazol_zfs_stats_efficiency_cnt-day.png
plugin config
graph_title ZFS ARC Efficiency by access
graph_category test
graph_args --lower-limit 0
e183b2fc.type DERIVE
e183b2fc.min 0
e183b2fc.draw AREASTACK
e183b2fc.label Demand Data Hits
e183b2fc.negative c43ccf39
f6c19979.type DERIVE
f6c19979.min 0
f6c19979.draw AREASTACK
f6c19979.label Demand Metadata Hits
f6c19979.negative 91b9302f
300ffdd8.type DERIVE
300ffdd8.min 0
300ffdd8.draw AREASTACK
300ffdd8.label Prefetch Data Hits
300ffdd8.negative 0a8d4ed8
5c59698a.type DERIVE
5c59698a.min 0
5c59698a.draw AREASTACK
5c59698a.label Prefetch Metadata Hits
5c59698a.negative 4ba6dfa7
c43ccf39.type DERIVE
c43ccf39.min 0
c43ccf39.draw AREASTACK
c43ccf39.label Demand Data Misses
c43ccf39.graph no
91b9302f.type DERIVE
91b9302f.min 0
91b9302f.draw AREASTACK
91b9302f.label Demand Metadata Misses
91b9302f.graph no
0a8d4ed8.type DERIVE
0a8d4ed8.min 0
0a8d4ed8.draw AREASTACK
0a8d4ed8.label Prefetch Data Misses
0a8d4ed8.graph no
4ba6dfa7.type DERIVE
4ba6dfa7.min 0
4ba6dfa7.draw AREASTACK
4ba6dfa7.label Prefetch Metadata Misses
4ba6dfa7.graph no
plugin value
e183b2fc.value 27272195330
c43ccf39.value 2003843956
f6c19979.value 5636236116
91b9302f.value 225540051
300ffdd8.value 9848264059
0a8d4ed8.value 678571537
5c59698a.value 257511296
4ba6dfa7.value 96005556
As far as I understand the issue, Munin relies on the referenced value (here c43ccf39
) to be known before the field using the reference (here e183b2fc
).
We are handing the field definitions directly over to rrdtool, which complains, if the referenced field is not known at that moment.
I think, we could solve this, if Munin would evaluate the relationship between fields and sort the field parsing accordingly. But this would take quite a lot of effort.
Alternatively we could just document the requirement of proper order for the negative
and cdef
fields in the Munin Guide. Most plugins (at least the ones that are currently working properly) already do this, since plugin authors seem to use only backward references intuitively.
Any thoughts?