2

I'm getting nuts writing a simple plugin to query my ehcache statistics. Look what i have so far:

$ munin-run ehcache 

standardquerycache_cachehits.value 1779609
standardquerycache_cachemisses.value 153404

Now I want to draw only a cache hit ratio graph but i fail to achieve this. I am even not getting it to work to draw a graph of the total sum (just for exercise):

$ munin-run ehcache config

graph_category Ehcache
graph_title Cache Hit ratios
graph_vlabel percent %
graph_order standardquerycache_total standardquerycache_ratio 
standardquerycache_cachehits.label standardquerycache_cachehits
standardquerycache_cachehits.graph no
standardquerycache_cachehits.type COUNTER
standardquerycache_cachemisses.label standardquerycache_cachemisses
standardquerycache_cachemisses.graph no
standardquerycache_cachemisses.type COUNTER
standardquerycache_total.sum standardquerycache_cachehits standardquerycache_cachemisses
standardquerycache_total.label standardquerycache_total
standardquerycache_ratio.label standardquerycache
standardquerycache_ratio.cdef standardquerycache_cachehits,standardquerycache_total,1,standardquerycache_total,0,EQ,IF,/,100,*,UNKN,standardquerycache_total,0,EQ,IF,UNKN,standardquerycache_total,UNKN,EQ,IF

This is my output in munin-update.log:

2011/08/07 16:36:39 Opened log file
2011/08/07 16:36:39 [INFO]: Starting munin-update
2011/08/07 16:36:39 [INFO]: Config update, ensuring type of '...total-g.rrd' is 'GAUGE'.
2011/08/07 16:36:39 [INFO]: Config update, ensuring max of '...rrd' is 'U'.
2011/08/07 16:36:39 [INFO]: Config update, ensuring min of '..total-g.rrd' is 'U'.
2011/08/07 16:36:39 [WARNING] Service ehcache on ... returned no data for label standardquerycache_total
2011/08/07 16:36:39 [WARNING] Service ehcache on ... returned no data for label standardquerycache_ratio
2011/08/07 16:36:39 [INFO] Reaping Munin::Master::UpdateWorker<...>.  Exit value/signal: 0/0
2011/08/07 16:36:39 [INFO]: Munin-update finished (0.14 sec)

Maybe I am doing something completely wrong, but munin seems to ask for a value which should be calculated by cdef.

Anything wrong with my plugin configuration?

Ben Pilbrow
  • 12,041
  • 5
  • 36
  • 57
Janning
  • 1,421
  • 2
  • 21
  • 38

1 Answers1

2

Ok, now i got it. the munin-update.log ist not the problem. i just have to wait 10 minutes before i can see the chart. It is a COUNTER, so it needs to have two values to draw a line. you can't even force this with munin-graph. so just build your plugin and wait for 10 minutes (boring).

Janning
  • 1,421
  • 2
  • 21
  • 38
  • Still didn't work for me, are you sure there is nothing you changed in your config? -Thanks – ColinM Sep 06 '11 at 03:03