Munin/Plugin configuration

From LinuxReviews
Jump to navigationJump to search

The Munin munin-node data monitoring tool has a variety of plugins with different and sometimes conflicting parameters and configuration options. Finding out what options a plugin takes is typically a matter of looking at the actual Perl file which provides the plugin. Here is a simple overview of some of the more common plugins and their options.

Remember: munin-node does not monitor /etc/munin/plugins or configuration files in /etc/munin/plugin-conf.d/. You need to

systemctl restart munin-node

to make changes take effect.

HTTP/HTTPS Load Times[edit]

This plugin lets you monitor how long wget spends loading one or more web page(s). It takes the arguments env.target and env.requisites. Set env.requisites to false if the target is any modern HTTPS using website or the load times will be unnaturally high.

It can be enabled with

ln -s /usr/share/munin/plugins/http_loadtime /etc/munin/plugins/http_loadtime

and configured with something like:

[http_loadtime]
env.target https://immortalpoetry.com/Immortal_Poetry,https://linuxreviews.org/LinuxReviews
env.requisites false

Network Traffic Plugins[edit]

Network interface traffic can be monitored with the if_ plugin. Per-interface monitoring is enabled by creating symbolic links named if_${Interface} (like if_enp9s0f0, if_bond0 etc). Enabling if_ for interface enp9s0f0 would be done with:

ln -s /usr/share/munin/plugins/if_ /etc/munin/plugins/if_enp9s0f0

There is a similar plugin named if_err_ for monitoring network errors, packet drops, and collisions.

The if_ plugin has some configuration options you likely do not need: user, speed (interface speed, should be autodetected correctly) and env.warning. These can be set per-interface. Example:

File: /etc/munin/plugin-conf.d/interfaces.conf
[if_*]
  user root
[if_enp9s0f0]
  env.speed 1000

Sensors (lm_sensors)[edit]

The sensors_ plugin will only work if you have lm_sensors (and the required kernel modules) up and running. It takes three arguments:

sensors_fan Monitor fan speeds
sensors_temp Monitor temperatures
sensors_volt Monitor voltages

You can only have one graph with all fans, using sensors_fan1, sensors_fan2 and so on is not supported.

ln -s /usr/share/munin/plugins/sensors_ /etc/munin/plugins/sensors_fan
ln -s /usr/share/munin/plugins/sensors_ /etc/munin/plugins/sensors_temp
ln -s /usr/share/munin/plugins/sensors_ /etc/munin/plugins/sensors_volt

This plugin claims it can configured using the following options under [sensors_*] in a plugin configuration file:

env.sensors Override default sensors program path
env.ignore_temp<n> Temperature <n> will not be plotted
env.ignore_fan<n> Fan <n> will not be plotted
env.ignore_volt<n> Voltage <n> will not be plotted
env.fan_warn_percent Percentage over mininum for warning
env.volt_warn_percent Percentage over mininum/under maximum for warning

env.fan_warn_percent and env.volt_warn_percent are the only options listed in the table above who actually do anything. /usr/share/munin/plugins/sensors_ does not have any code that would allow it to care about ignore_ configuration options. Thus, the following configuration is valid according to the documentation but it doesn't do anything at all:

File: /etc/munin/plugin-conf.d/sensors.conf
[sensors_*]
  env.ignore_temp3
  env.ignore_temp4
  env.ignore_temp5
  env.ignore_fan5

There is a work-around: lm_sensors can be configured to hide fans and temperatures using configuration files in /etc/sensors.d:

File: /etc/sensors.d/ignore.conf
chip "*"
    ignore temp4
    ignore temp5
    ignore temp6
    ignore fan5

will actually accomplish what the above munin-node configuration file example doesn't.


Back to Munin