3

I have defined an additional graph (in Munin, munin.conf) that calculates the total size of my MySQL database. The index and data sizes are extracted from an external plugin. The definition looks like this:

[...]

[Database;my.host.com]
    address my.host.com
    use_node_name yes

    dbsize.update no
    dbsize.graph_args --base 1024 -l 0
    dbsize.graph_title Total database size
    dbsize.graph_vlabel bytes
    dbsize.graph_category mysql
    dbsize.graph_info The total database size.
    dbsize.graph_order the_sum
    dbsize.the_sum.sum \
            my.host.com:mysql_size.index \
            my.host.com:mysql_size.datas
    dbsize.the_sum.label data+index
    dbsize.the_sum.type GAUGE
    dbsize.the_sum.min 0

[...]

Now, is it possible to extract the current value of this graph? Running

# munin-run dbsize

or

# munin-run my.host.com:dbsize

does not seem to work.

Joe
  • 1,775
  • 15
  • 23
Ztyx
  • 1,385
  • 3
  • 14
  • 28
  • I've posted the same question on the munin-users mailing list and will put any answer here in case I get a good one. See here: http://sourceforge.net/mailarchive/forum.php?thread_name=1270113162.4972.33.camel%40beatbox&forum_name=munin-users – Ztyx Apr 01 '10 at 09:18

1 Answers1

0

Maybe you could try getting the value directly from RRDTool?

Munin mantains rrdtool (.rrd) files for the sources, you could try using rrdtool directly on munin's rrd to get the values.

Ricardo Pardini
  • 776
  • 7
  • 9
  • Yes, I've thought of it. The thing is I have a generic script that extracts values from Munin plugins using munin-run. I might write a fake-plugin that just extracts the rrd-value... – Ztyx Apr 01 '10 at 09:16
  • According to the mailing list http://sourceforge.net/mailarchive/forum.php?thread_name=1270113162.4972.33.camel%40beatbox&forum_name=munin-users your solution seems to be the only one. Thanks! – Ztyx Apr 01 '10 at 12:38