简体   繁体   English

Munin:当插件文件名包含点时,使用munin.conf更改插件类别?

[英]Munin: Change plugin category using munin.conf, when plugin filename contains dots?

Each plugin in munin has some configuration settings and one of them is the category it belongs to (graph_category). munin中的每个插件都有一些配置设置,其中之一是它所属的类别(graph_category)。

I would like to change the category of some plugins to the non-default one. 我想将某些插件的类别更改为非默认类别。 As I see in the munin.conf man page, I can change specific directives for plugins per host like this: 正如我在munin.conf手册页中看到的那样,我可以为每个主机更改插件的特定指令,如下所示:

[machine1.your.dom]
    address localhost
    load.graph_title Edited title of the load-graph

Now I tried the same with the ping plugin and the graph_category instead of the graph_title as shows this example, but I can't get it to work. 现在,我使用ping插件和graph_category(而不是graph_title)尝试了相同的示例,但是我无法使其正常工作。

I have a machine pinging different hosts with different meaning, so I would like to group them in different categories for easy access. 我有一台机器对具有不同含义的不同主机执行ping操作,因此我想将它们分为不同的类别以便于访问。

for example: 例如:

ping_192.168.1.1    <- category: lan connectivity
ping_192.168.1.2    <- category: lan connectivity
ping_10.0.0.10      <- category: intranet connectivity
ping_10.0.0.20      <- category: intranet connectivity
ping_www.google.com <- category: internet connectivity

UPDATE: I tried the same with another plugin and it worked. 更新:我尝试与另一个插件相同,并且有效。 I suspect it's something with the periods included in the domain or IP address of the ping plugin name. 我怀疑这与ping插件名称的域或IP地址中包含的句点有关。

I just found the solution after reading the following ticket: 我在阅读以下票证后才找到解决方案:

http://munin-monitoring.org/ticket/526 http://munin-monitoring.org/ticket/526

When a plugin name contain dots, these dots must be replaced with an underscore. 当插件名称包含点时,必须用下划线替换这些点。 So the solution to the example in my question will work like this: 因此,我问题中示例的解决方案将像这样工作:

[machine1.your.dom]
    address localhost
    ping_192_168_1_1.graph_category lan connectivity
    ping_192_168_1_2.graph_category lan connectivity
    ping_10_0_0_10.graph_category intranet connectivity
    ping_10_0_0_20.graph_category intranet connectivity
    ping_www_google_com.graph_category internet connectivity

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM