我已经定义了一个额外的图表(在Munin, munin.conf ),它计算了我的MySQL数据库的总大小。 索引和数据大小是从外部插件提取的。 定义如下所示:
[...] [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 [...]
现在, 是否有可能提取此图的当前值? 运行
# munin-run dbsize
要么
# munin-run my.host.com:dbsize
似乎没有工作。
也许你可以尝试直接从RRDTool获取价值?
Munin为源代码提供了rrdtool(.rrd)文件,您可以直接在munin的rrd上使用rrdtool来获取值。