Skip to content

Commit

Permalink
Add "how to use plugins" page
Browse files Browse the repository at this point in the history
  • Loading branch information
ssm committed Jul 8, 2012
1 parent 3e00cc3 commit 6b207a0
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions doc/plugin/use.rst
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

0 comments on commit 6b207a0

Please sign in to comment.