wiki:plugin-conf.d

TOC?

plugin-conf.d

Attention: The content of this page has been moved to the Munin Guide. This wiki page has therefore been set to "Read only" and later will be purged.

plugin-conf.d is the directory where you can place configuration files to adjust plugin configuration to your needs. When pre-packaged, it's usually located in /etc/munin/, while if compiled from source it is often found in /etc/opt/munin/.

If more than one file is found, the files are read in alphabetical order. If the same behaviour is defined in more than one file, the directives from the last file read takes precedence.

Also read these notes on priority and inheritance.

The file should consist of one or more sections, one section for each (group of) plugin(s) that should run with different privileges and/or environment variables.

Each section should have the following format, where all attributes are optional. Start a plugins configuration section with the plugins name in square brackets.

[<plugin name>]
user <user>
group <group>
command <command>
env.<variable> <value>
host_name <host-name>
timeout <seconds>

The attributes adhere to the following:

[<plugin-name>]The following lines are for <plugin-name>. May include one wildcard ('*') at the start or end of the plugin-name, but not both, and not in the middle.
user <username|userid>Run plugin as this user
group <groupname|groupid>[, <groupname|groupid>] [...]Run plugin as this group. If group is inside parentheses, the plugin will continue if the group doesn't exist. What does comma separated groups do? See $EFFECTIVE_GROUP_ID in the manual page for perlvar(1)
command <command>Run <command> instad of plugin. %c will be expanded to what would otherwise have been run. E.g. command sudo -u root %c.
env.<var> <contents>Will cause the environment variable <var> to be set to <contents> when running the plugin. More than one env line may exist. See the individual plugins to find out which variables they care about.
host_name <host-name>Forces the plugin to be associated with the given host, overriding anything that "plugin config" may say. (This option is very old but has never been documented)
timeout <seconds>Maximum number of seconds before the plugin script should be killed when fetching values. The default is 10 seconds, but some plugins may require more time. This option has been available since [461].

Examples:

[mysql*]
user root
env.mysqlopts --defaults-extra-file=/etc/mysql/debian.cnf

[exim_mailqueue]
group mail, (Debian-exim)

[exim_mailstats]
group mail, adm

[ldap_*]
env.binddn cn=munin,dc=foo,dc=bar
env.bindpw secret

[snmp_*]
env.community SecretSNMPCommunityString

[smart_*]               # The following configuration affects 
                        # every plugin called by a service-link starting with smart_
                        # Examples: smart_hda, smart_hdb, smart_sda, smart_sdb
user root
group disk
Last modified at 2014-10-07T18:39:25+02:00 Last modified on 2014-10-07T18:39:25+02:00