File: plugin.rst

package info (click to toggle)
munin 2.0.76-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,064 kB
  • sloc: perl: 11,684; java: 1,924; sh: 1,632; makefile: 636; javascript: 365; python: 267
file content (151 lines) | stat: -rw-r--r-- 12,551 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
.. _plugin-reference:

==================
 Plugin reference
==================

.. index::
   pair: plugin; fields

Fields
======

On a configuration run, the plugin is called with the argument "config". The
following fields are used.

+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| Field              | Value            | type     | Description                              | See also         | Default |
+====================+==================+==========+==========================================+==================+=========+
| graph_title        | string           | required | Sets the title of the graph              |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| graph_args         | string           | optional | Arguments for the rrd grapher. This is   | rrdgraph_        |         |
|                    |                  |          | used to control how the generated graph  |                  |         |
|                    |                  |          | looks, and how values are interpreted or |                  |         |
|                    |                  |          | presented.                               |                  |         |
|                    |                  |          |                                          |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| graph_vlabel       | string           | optional | Label for the vertical axis of the graph |                  |         |
|                    |                  |          |                                          |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| graph_category     | lower case       | optional | Category used to sort the graph on the   |                  | misc    |
|                    | string, no       |          | generated index web page.                |                  |         |
|                    | whitespace       |          |                                          |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| graph_info         | html text        | optional | Additional text for the generated graph  |                  |         |
|                    |                  |          | web page                                 |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| graph_scale        | yes|no           | optional | If "yes", the generated graph will be    |                  | no      |
|                    |                  |          | scaled to the upper and lower values of  |                  |         |
|                    |                  |          | the datapoints within the graph.         |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| graph_order        | space separated  | optional | Ensures that the listed datapoints are   |                  |         |
|                    | list of          |          | displayed in order. Any additional       |                  |         |
|                    | graph.datapoints |          | datapoints are added in the order of     |                  |         |
|                    |                  |          | appearance after datapoitns appearing on |                  |         |
|                    |                  |          | this list.                               |                  |         |
|                    |                  |          |                                          |                  |         |
|                    |                  |          | This field is also used for "borrowing", |                  |         |
|                    |                  |          | which is the practice of taking          |                  |         |
|                    |                  |          | datapoints from other graphs.            |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| update_rate        | integer          | optional | Sets the update_rate used by the munin   |                  |         |
|                    | (seconds)        |          | master when it creates the RRD file.     |                  |         |
|                    |                  |          |                                          |                  |         |
|                    |                  |          | The update rate is the interval at which |                  |         |
|                    |                  |          | the RRD file expects to have data.       |                  |         |
|                    |                  |          |                                          |                  |         |
|                    |                  |          | This field requires a munin master       |                  |         |
|                    |                  |          | version of at least 2.0.0                |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| datapoint.label    | lower case       | required | The label used in the graph for this     |                  |         |
|                    | string, no       |          | field                                    |                  |         |
|                    | whitespace       |          |                                          |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| datapoint.info     | html text        | optional | Additional html text for the generated   |                  |         |
|                    |                  |          | graph web page, used in the field        |                  |         |
|                    |                  |          | description table                        |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| datapoint.warning  | integer, or      | optional | This field defines a threshold value or  |                  |         |
|                    | integer:integer  |          | range. If the field value above the      |                  |         |
|                    | (signed)         |          | defined warning value, or outside the    |                  |         |
|                    |                  |          | range, the service is considered to be in|                  |         |
|                    |                  |          | a "warning" state.                       |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| datapoint.critical | integer, or      | optional | This field defines a threshold value or  |                  |         |
|                    | integer:integer  |          | range. If the field value is above the   |                  |         |
|                    | (signed)         |          | defined critical value, or outside the   |                  |         |
|                    |                  |          | range, the service is considered to be in|                  |         |
|                    |                  |          | a "critical" state.                      |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| datapoint.graph    | yes|no           | optional | Determines if this datapoint should be   |                  | yes     |
|                    |                  |          | visible in the generated graph.          |                  |         |
|                    |                  |          |                                          |                  |         |
|                    |                  |          |                                          |                  |         |
|                    |                  |          |                                          |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| datapoint.cdef     | CDEF statement   | optional | A CDEF statement is a Reverse Polish     | cdeftutorial_    |         |
|                    |                  |          | Notation statement used to construct a   |                  |         |
|                    |                  |          | datapoint from other datapoints.         |                  |         |
|                    |                  |          |                                          |                  |         |
|                    |                  |          | This is commonly used to calculate       |                  |         |
|                    |                  |          | percentages.                             |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+
| datapoint.draw     | AREA, LINE,      |          | Determines how the graph datapoints are  | rrdgraph_        | LINE    |
|                    | LINE[n], STACK,  |          | displayed in the graph. The "LINE" takes |                  |         |
|                    | AREASTACK,       |          | an optional width suffix, commonly       |                  |         |
|                    | LINESTACK,       |          | "LINE1", "LINE2", etc…                   |                  |         |
|                    | LINE[n]STACK     |          | The \*STACK values are specific to munin |                  |         |
|                    |                  |          | and makes the first a LINE, LINE[n] or   |                  |         |
|                    |                  |          | AREA datasource, and the rest as STACK.  |                  |         |
+--------------------+------------------+----------+------------------------------------------+------------------+---------+

On a data fetch run, the plugin is called with no arguments. the following
fields are used.

+-----------------+-----------------------+----------+------------------+------+------------+
| Field           | Value                 | type     | Description      | See  | Default    |
|                 |                       |          |                  | also |            |
+=================+=======================+==========+==================+======+============+
| datapoint.value | integer, scientific   | required | The value to be  |      | No default |
|                 | notation, or "U" (may |          | graphed.         |      |            |
|                 | be signed)            |          |                  |      |            |
|                 |                       |          |                  |      |            |
+-----------------+-----------------------+----------+------------------+------+------------+

.. index::
   pair: plugin; executing

Example
=======

This is an example of the plugin fields used with the "df" plugin. The
"munin-run" command is used to run the plugin from the command line.

Configuration run
-----------------

::

 # munin-run df config
 graph_title Filesystem usage (in %)
 graph_args --upper-limit 100 -l 0
 graph_vlabel %
 graph_category disk
 graph_info This graph shows disk usage on the machine.
 _dev_hda1.label /
 _dev_hda1.info / (ext3) -> /dev/hda1
 _dev_hda1.warning 92
 _dev_hda1.critical 98

Data fetch run
--------------

::

 # munin-run df
 _dev_hda1.value 83


.. _cdeftutorial: http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html

.. _rrdgraph: http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html