3 Copyright (C) 2004 Christian Schnidrig, Shawn Ferry, Stanislav Sinyagin
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 Christian Schnidrig <christian.schnidrig@bluewin.ch>
25 Templates to use with HTTP colletor plugin.
27 In addition to these templates, you would need collector period definitions
28 from generic/collector-periods.xml.
29 Templates requred to build the datasource:
30 "one-minute-period" or "five-minute-period"
32 "apache-httpd-v1" or "apache-httpd-v2"
37 You need to enable the status module and /server-status location in your
44 <!-- Parameters which need to be expanded accorrding
45 to $defs and %paramrefs% -->
47 <prop param="http-url" prop="expand" value="1"/>
53 <template name="apache-httpd-common">
54 <param name="ds-type" value="collector"/>
55 <param name="collector-type" value="http"/>
56 <param name="storage-type" value="rrd"/>
57 <param name="data-file"
58 value="%system-id%_apache_httpd.rrd" />
59 <param name="system-id" value="%http-host%" />
61 <param name="rrd-create-min" value="0"/>
62 <param name="rrd-create-max" value="U"/>
64 <param name="graph-lower-limit" value="0"/>
65 <param name="leaf-type" value="rrd-def"/>
66 <param name="rrd-cf" value="AVERAGE"/>
68 <param name="http-url"
69 value="http://%http-host%/server-status?auto" />
70 <param name="http-timeout" value="5"/>
72 <param name="comment" value="Apache HTTPd statistics"/>
74 <leaf name="Accesses">
75 <param name="comment" value="HTTP accesses per second"/>
76 <param name="graph-legend" value="Hits per second"/>
77 <param name="vertical-label" value="hits/s" />
78 <param name="http-object"
79 value="1:/Total Accesses:\s*(\d+)\s*/"/>
80 <param name="rrd-ds" value="accesses"/>
81 <param name="rrd-create-dstype" value="COUNTER"/>
82 <param name="rrd-create-max" value="1e6"/>
83 <param name="precedence" value="100"/>
88 value="HTTP traffic in bits per second"/>
89 <param name="graph-legend" value="Bits per second"/>
90 <param name="vertical-label" value="bps" />
91 <param name="http-object"
92 value="*:/Total kBytes:\s*(\d+)\s*\n/, 8192,*"/>
93 <param name="rrd-ds" value="traffic"/>
94 <param name="rrd-create-dstype" value="COUNTER"/>
95 <param name="rrd-create-max" value="1e8"/>
96 <param name="precedence" value="80"/>
99 <leaf name="BusyServers">
100 <param name="comment" value="Number of busy HTTP servers"/>
101 <param name="graph-legend" value="Busy Servers"/>
102 <param name="rrd-ds" value="busy"/>
103 <param name="precedence" value="60"/>
104 <param name="rrd-create-dstype" value="GAUGE"/>
107 <leaf name="IdleServers">
108 <param name="comment" value="Number of idle http servers"/>
109 <param name="graph-legend" value="Idle Servers"/>
110 <param name="rrd-ds" value="idle"/>
111 <param name="precedence" value="40"/>
112 <param name="rrd-create-dstype" value="GAUGE"/>
117 <!-- Apache 1.0 statistics -->
118 <template name="apache-httpd-v1">
119 <leaf name="BusyServers">
120 <param name="http-object" value="*:/BusyServers:\s*(\d+)\s*\n/"/>
122 <leaf name="IdleServers">
123 <param name="http-object" value="*:/IdleServers:\s*(\d+)\s*\n/"/>
128 <!-- Apache 2.0 statistics -->
129 <template name="apache-httpd-v2">
130 <leaf name="BusyServers">
131 <param name="http-object" value="*:/BusyWorkers:\s*(\d+)\s*\n/"/>
133 <leaf name="IdleServers">
134 <param name="http-object" value="*:/IdleWorkers:\s*(\d+)\s*\n/"/>