Environment variables accessible in plugins¶
The node automatically defines some environment vars. All the munin-related
vars do begin with the
MUNIN_ prefix and are all capitals.
Defines the debug level the plugin should run in.
- Contains the IP of the connecting master. If using
munin-run, it is equal to the
- Indicates whether the master is able to understand the dirtyconfig protocol.
|0||Master does not understand
|1||Master is able to consume
- Indicates whether the master is able to understand the multigraph keyword.
|0||Master does not understand the
|1||Master does understand the
Defines the directory that a plugin must use if it wants to store stateful data that is shared with other plugins.
Only the plugins that execute themselves as the same user can exchange data, for obvious security reasons.
Defines a file that the plugin must use if it wants to store stateful data for himself.
It is guaranteed to be unique, per plugin and per master. Therefore 2 masters will have 2 different state files for the same plugin.
Here is a list of other environment vars, that are derived from the
MUNIN_PREFIX MUNIN_CONFDIR MUNIN_BINDIR MUNIN_SBINDIR MUNIN_DOCDIR MUNIN_LIBDIR MUNIN_HTMLDIR MUNIN_CGIDIR MUNIN_CGITMPDIR MUNIN_DBDIR MUNIN_PLUGSTATE MUNIN_SPOOLDIR MUNIN_MANDIR MUNIN_LOGDIR MUNIN_STATEDIR MUNIN_USER MUNIN_GROUP MUNIN_PLUGINUSER MUNIN_VERSION MUNIN_PERL MUNIN_PERLLIB MUNIN_GOODSH MUNIN_BASH MUNIN_PYTHON MUNIN_RUBY MUNIN_OSTYPE MUNIN_HOSTNAME MUNIN_HASSETR
Munin does redefine some system environment vars :
- This is redefined for security. It does provide a safe environment so
that shell scripts are able to launch regular commands such as
grepwithout having to be explicit in their location.
- This is redefined to ease the work of plugin authors. It enables a standard output when parsing common commands output.