-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
.. _plugin-use: | ||
|
||
===================== | ||
Using munin plugins | ||
===================== | ||
|
||
.. index:: | ||
pair: plugin; installing | ||
|
||
Installing | ||
========== | ||
|
||
The default plugin directory is /etc/munin/plugins/. | ||
|
||
To install a plugin, place it in the plugin directory, and make it | ||
executable. | ||
|
||
You can also place the plugin elsewhere, and install a symbolic link | ||
in the plugin directory. All the plugins provided with munin are | ||
installed in this way. | ||
|
||
.. index:: | ||
pair: plugin; configuration | ||
|
||
Configuring | ||
=========== | ||
|
||
The plugin configuration directory is /etc/munin/plugin-conf.d/. The | ||
syntax is: | ||
|
||
user <username> | ||
The user the plugin will run as. | ||
|
||
Default: munin | ||
|
||
group <groupname> | ||
The group the plugin will run as | ||
|
||
Default: munin | ||
|
||
env.variablename <variable content> | ||
Defines and exports an environment variable called "variablename" | ||
with the content set to <variable content>. | ||
|
||
There is no need to quote the variable content. | ||
|
||
.. note:: | ||
|
||
When configuring a munin plugin, add the least amount of extra | ||
privileges needed to run the plugin. For instance, do not run a | ||
plugin with "user root" to read syslogs, when it may be sufficient | ||
to set "group adm" instead. | ||
|
||
Example: | ||
|
||
.. index:: | ||
triple: example; plugin; configuration | ||
|
||
:: | ||
|
||
[pluginname] | ||
user username | ||
group groupname | ||
env.variablename some content for the variable | ||
env.critical 92 | ||
env.warning 95 | ||
|
||
Plugin configuration is optional. | ||
|
||
.. index:: | ||
pair: plugin; testing | ||
|
||
Testing | ||
======= | ||
|
||
To test if the plugin works when executed by munin, you can use the | ||
:ref:`munin-run` command. | ||
|
||
.. code-block:: bash | ||
# munin-run myplugin config | ||
# munin-run myplugin |