如何阻止 munin 计算以毫秒为单位的值?

How to stop munin from calculating the values in millis?

我写了自己的 munin-plugin,但我很困惑,munin 如何表示 0 到 1 之间的值。 第二行值使用带有 'n' 的符号。这是什么意思,我该如何避免?我只想要一个像 0.33 这样的普通浮点值! 我做错了什么?

插件配置如下:

graph_title Title
graph_args --base 1000 -l 0
graph_vlabel label
graph_category backup

欢迎任何提示。

更新

好的,我终于找到了:https://serverfault.com/questions/123761/what-does-the-m-unit-in-munin-mean

'm'代表毫!

我有点困惑,为什么munin在这个上下文中使用它!

有没有可能避免这种情况?

一些您可能感兴趣的配置项。参见 Munin Plugin Reference

您可以使用以下方法更改 table 数据中数字分辨率的分辨率。使用 C/C++ 格式,间距可能是最终结果的问题。

graph_printf %5.2le     # default is %6.2lf
                        # appears l (for long) is needed

对于某些图表类型,您还可以更改 munin 图表的显示周期。 Munin 绘制了最后两次(通常间隔 5 分钟)测量之间的平均数据——结果默认为 per/sec 单位。这是基于默认为 GAUGEvar.type 属性。例如,如果您的数据报告的是累计计数,您可以使用:

type DERIVE         # data displayed is change from last 
                    #   reading 
type COUNTER        # accumulating counter with reset on rollover

对于其中的每一个,您都可以更改垂直轴以使用 per/minuteper/hour 以及:

graph_period minute # if type DERIVE or COUNTER  
                    # display avg/period vs default of avg/sec

请注意 table 显示 graph_period 的派生数据。
有关实施细节,请参阅 RRDCreate == rrdtool create - munin 在下面使用了 rrd。