Add haproxy module from tor
[mirror/dsa-puppet.git] / modules / haproxy / files / monitoring-munin-haproxy / README.md
1 # haproxyng Munin Plugin
2
3 This is a Munin plugin which allows you to monitor a large number of statistics
4 from within HAPRoxy, including:
5
6   * Bandwidth for Frontends
7       * Broken down by Service
8   * Bandwidth for Backends
9       * Broken down by Service
10           * Broken down by Host
11   * Timings for Backends
12       * Broken down by Service
13           * Broken down by Host
14   * Sessions for Frontends
15       * Broken down by Service
16   * Sessions for Backends
17       * Broken down by Service
18           * Broken down by Host
19   * Response Codes for Frontends
20       * Broken down by Service (aggregating by Status Code)
21           * Broken down by Status Code
22   * Response Codes for Backends
23       * Broken down by Service (aggregating by Server)
24           * Broken down by Server
25       * Broken down by Service (aggregating by Status Codes)
26           * Broken down by Status (aggregating by Server)
27               * Broken down by Server
28
29 ## Warning
30
31 This can product a lot of graphs: With about 50 servers and around 10 services
32 you can probably exceed over 1000 graphs being produced covering all the above.
33
34 This setup either required some *very* fast hardware, or it's best to make sure
35 that you are using something like `rrdcached` and SSDs to make sure that you
36 are aggregating updates, caching reads, etc. Additionally, creating graphs
37 on-the-fly via CGI may end up being better, unless you can safely produce a very
38 large number of graphs every five minutes with room to spare and grow!
39
40 ## Usage
41
42 You will need Munin 2.0 as this is a `multigraph` plugin and will output all
43 graphs in a single run.
44
45    [haproxyng*]
46      env.socket /path/to/socket
47      env.clean prefix-
48
49 `haproxyng` takes two environmental options:
50
51   * `socket` which is the path to the UNIX socket to HAProxy. This script only
52     needs the `user` level permission to get read access to the statistics. No
53     write or admin level access is required.
54   * `clean` which can be used to strip common parts of a name from the
55     configuration. For example if you're configuration is automatically
56     generated and everything is prefixed with "staging-" or "production_" then
57     put that (or any other regex) into `clean` and it will be cleaned from any
58     titles before being output to Munin.
59
60 Beyond that, copy/symlink it to the `plugins/` directory on the relevant node
61 and wait for it to run. Running
62
63     munin-run haproxyng config
64
65 is also possible to verify that it can see everything and output the
66 configuration data for Munin.
67
68 ## Licence
69
70 This program is free software; you can redistribute it and/or
71 modify it under the terms of the GNU General Public License
72 as published by the Free Software Foundation; either version 2
73 of the License, or (at your option) any later version.
74
75 This program is distributed in the hope that it will be useful,
76 but WITHOUT ANY WARRANTY; without even the implied warranty of
77 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
78 GNU General Public License for more details.
79
80 You should have received a copy of the GNU General Public License
81 along with this program; if not, write to the Free Software
82 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.