import torrus 1.0.9
[freeside.git] / torrus / xmlconfig / old / snmp-defs.old-0.1.2.xml
1 <?xml version="1.0"?>
2 <!--
3    Copyright (C) 2002  Stanislav Sinyagin
4
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.
9
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.
14
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18
19   $Id: snmp-defs.old-0.1.2.xml,v 1.1 2010-12-27 00:04:28 ivan Exp $
20   Stanislav Sinyagin <ssinyagin@yahoo.com>
21
22 -->
23
24 <!-- These are the basic definitions for the SNMP collector
25
26   WARNING: This file is overwritten by "make install"
27 -->
28
29 <configuration>
30
31 <definitions>
32   <!-- IF-MIB:ifTable  -->
33   <def name="ifDescr"           value="1.3.6.1.2.1.2.2.1.2" />
34   <def name="ifPhysAddress"     value="1.3.6.1.2.1.2.2.1.6" />
35   <def name="ifInOctets"        value="1.3.6.1.2.1.2.2.1.10" />
36   <def name="ifInUcastPkts"     value="1.3.6.1.2.1.2.2.1.11" />
37   <def name="ifInErrors"        value="1.3.6.1.2.1.2.2.1.14" />
38   <def name="ifOutOctets"       value="1.3.6.1.2.1.2.2.1.16" />
39   <def name="ifOutUcastPkts"    value="1.3.6.1.2.1.2.2.1.17" />
40   <def name="ifOutErrors"       value="1.3.6.1.2.1.2.2.1.20" />
41
42   <!-- IF-MIB:ifXTable -->
43   <def name="ifName"            value="1.3.6.1.2.1.31.1.1.1.1" />
44   <def name="ifHCInOctets"      value="1.3.6.1.2.1.31.1.1.1.6" />
45   <def name="ifHCInUcastPkts"   value="1.3.6.1.2.1.31.1.1.1.7" />
46   <def name="ifHCOutOctets"     value="1.3.6.1.2.1.31.1.1.1.10" />
47   <def name="ifHCOutUcastPkts"  value="1.3.6.1.2.1.31.1.1.1.11" />
48
49   <!-- RFC1213-MIB:ipAddrTable -->
50   <def name="ipAdEntIfIndex"   value="1.3.6.1.2.1.4.20.1.2" />
51
52   <!-- Interface indices -->
53   <def name="IFIDX_DESCR"   value="M($ifDescr, %interface-name%)" />
54   <def name="IFIDX_MAC"     value="M($ifPhysAddress, %interface-mac%)" />
55   <def name="IFIDX_IP"      value="V(ipAdEntIfIndex.%interface-ipaddr%)" />
56
57   <!-- Default Interface index lookup -->
58   <def name="IFIDX"         value="M(%ifindex-table%, %interface-name%)" />
59
60 </definitions>
61
62 <datasources>
63
64   <template name="interface-counters">
65
66     <leaf name="InOutBps">
67       <param name="comment" value="Input and Output bits per second graphs" />
68       <param name="vertical-label"   value="bps" />
69       <param name="graph-lower-limit" value="0" />
70       <param name="rrd-hwpredict"    value="disabled" />
71       <param name="precedence"       value="1000" />
72       <param name="ds-type"          value="rrd-multigraph" />
73       <param name="ds-names"         value="in,out" />
74
75       <param name="ds-expr-in"       value="{ifInOctets},8,*" />
76       <param name="graph-legend-in"  value="Bits per second in" />
77       <param name="line-style-in"    value="##BpsIn" />
78       <param name="line-color-in"    value="##BpsIn" />
79       <param name="line-order-in"    value="1" />
80
81       <param name="ds-expr-out"      value="{ifOutOctets},8,*" />
82       <param name="graph-legend-out" value="Bits per second out" />
83       <param name="line-style-out"   value="##BpsOut" />
84       <param name="line-color-out"   value="##BpsOut" />
85       <param name="line-order-out"   value="2" />
86     </leaf>
87
88     <leaf name="ifInOctets">
89       <param name="snmp-object"       value="$ifInOctets.$IFIDX" />
90       <param name="rrd-ds"            value="ifInOctets" />
91       <param name="rrd-create-dstype" value="COUNTER" />
92       <param name="comment"  value="Input byte counter for the interface" />
93       <param name="graph-legend"      value="Bytes in" />
94       <param name="vertical-label"    value="Bps" />
95       <param name="graph-lower-limit" value="0" />
96     </leaf>
97
98     <leaf name="ifInUcastPkts">
99       <param name="snmp-object"       value="$ifInUcastPkts.$IFIDX" />
100       <param name="rrd-ds"            value="ifInUcastPkts" />
101       <param name="rrd-create-dstype" value="COUNTER" />
102       <param name="comment" value="Input packet counter for the interface" />
103       <param name="graph-legend"      value="Packets in" />
104       <param name="vertical-label"    value="pps" />
105       <param name="graph-lower-limit" value="0" />
106     </leaf>
107
108     <leaf name="ifOutOctets">
109       <param name="snmp-object"       value="$ifOutOctets.$IFIDX" />
110       <param name="rrd-ds"            value="ifOutOctets" />
111       <param name="rrd-create-dstype" value="COUNTER" />
112       <param name="comment" value="Output byte counter for the interface" />
113       <param name="graph-legend"      value="Bytes out" />
114       <param name="vertical-label"    value="Bps" />
115       <param name="graph-lower-limit" value="0" />
116     </leaf>
117
118     <leaf name="ifOutUcastPkts">
119       <param name="snmp-object"       value="$ifOutUcastPkts.$IFIDX" />
120       <param name="rrd-ds"            value="ifOutUcastPkts" />
121       <param name="rrd-create-dstype" value="COUNTER" />
122       <param name="comment" value="Output packet counter for the interface" />
123       <param name="graph-legend"      value="Packets out" />
124       <param name="vertical-label"    value="pps" />
125       <param name="graph-lower-limit" value="0" />
126     </leaf>
127
128   </template>
129
130   <template name="hc-interface-counters">
131
132     <leaf name="InOutBps">
133       <param name="comment" value="Input and Output bits per second graphs" />
134       <param name="vertical-label"   value="bps" />
135       <param name="graph-lower-limit" value="0" />
136       <param name="rrd-hwpredict"    value="disabled" />
137       <param name="precedence"       value="1000" />
138       <param name="ds-type"          value="rrd-multigraph" />
139       <param name="ds-names"         value="in,out" />
140
141       <param name="ds-expr-in"       value="{ifHCInOctets},8,*" />
142       <param name="graph-legend-in"  value="Bits per second in" />
143       <param name="line-style-in"    value="##BpsIn" />
144       <param name="line-color-in"    value="##BpsIn" />
145       <param name="line-order-in"    value="1" />
146
147       <param name="ds-expr-out"      value="{ifHCOutOctets},8,*" />
148       <param name="graph-legend-out" value="Bits per second out" />
149       <param name="line-style-out"   value="##BpsOut" />
150       <param name="line-color-out"   value="##BpsOut" />
151       <param name="line-order-out"   value="2" />
152     </leaf>
153
154     <leaf name="ifHCInOctets">
155       <param name="snmp-object"       value="$ifHCInOctets.$IFIDX" />
156       <param name="rrd-ds"            value="ifHCInOctets" />
157       <param name="rrd-create-dstype" value="COUNTER" />
158       <param name="comment"  value="Input byte counter for the interface" />
159       <param name="graph-legend"      value="Bytes in" />
160       <param name="vertical-label"    value="Bps" />
161       <param name="graph-lower-limit" value="0" />
162     </leaf>
163
164     <leaf name="ifHCInUcastPkts">
165       <param name="snmp-object"       value="$ifHCInUcastPkts.$IFIDX" />
166       <param name="rrd-ds"            value="ifHCInUcastPkts" />
167       <param name="rrd-create-dstype" value="COUNTER" />
168       <param name="comment" value="Input packet counter for the interface" />
169       <param name="graph-legend"      value="Packets in" />
170       <param name="vertical-label"    value="pps" />
171       <param name="graph-lower-limit" value="0" />
172     </leaf>
173
174     <leaf name="ifHCOutOctets">
175       <param name="snmp-object"       value="$ifHCOutOctets.$IFIDX" />
176       <param name="rrd-ds"            value="ifHCOutOctets" />
177       <param name="rrd-create-dstype" value="COUNTER" />
178       <param name="comment" value="Output byte counter for the interface" />
179       <param name="graph-legend"      value="Bytes out" />
180       <param name="vertical-label"    value="Bps" />
181       <param name="graph-lower-limit" value="0" />
182     </leaf>
183
184     <leaf name="ifHCOutUcastPkts">
185       <param name="snmp-object"       value="$ifHCOutUcastPkts.$IFIDX" />
186       <param name="rrd-ds"            value="ifHCOutUcastPkts" />
187       <param name="rrd-create-dstype" value="COUNTER" />
188       <param name="comment" value="Output packet counter for the interface" />
189       <param name="graph-legend"      value="Packets out" />
190       <param name="vertical-label"    value="pps" />
191       <param name="graph-lower-limit" value="0" />
192     </leaf>
193
194   </template>
195
196   <subtree name="SNMP">
197     <param name="ds-type" value="collector" />
198     <param name="collector-type" value="snmp" />
199
200     <!-- Two mandatory parameters define the collector schedule.
201          The collector runs at moments defined by formula:
202            time + period - (time mod period) + timeoffset -->
203     <param name="collector-period" value="300" />
204     <param name="collector-timeoffset" value="10" />
205
206     <param name="storage-type" value="rrd" />
207
208     <param name="comment" value="Data collected via SNMP" />
209
210     <!-- SNMP Parameters -->
211
212     <!-- Optional SNMP version. Default is 2c.
213          Valid values are: 1, 2c.
214          Version 3 will be supported in the future.  -->
215     <param name="snmp-version" value="2c" />
216
217     <!-- Optional port. Deefault is 161 -->
218     <param name="snmp-port" value="161" />
219
220     <!-- Mandatory community name -->
221     <param name="snmp-community" value="public" />
222
223     <!-- Mandatory session timeout and no. of retries -->
224     <param name="snmp-timeout" value="10" />
225     <param name="snmp-retries" value="2" />
226
227     <!-- Optional domain name. Appended to a hostname which
228          has no dots in it -->
229     <param name="domain-name" value="must.redefine.domain.net" />
230
231     <!-- Where the interface index is looked up -->
232     <param name="ifindex-table" value="$ifDescr" />
233
234     <!-- RRD Parameters -->
235
236     <!-- Directory path where RRD files will be stored -->
237     <param name="data-dir" value="/var/snmpcollector" />
238
239     <!-- Round-robin arrays to be created, separated by space.
240      In this example, we keep 5-minute details for 2 weeks,
241      30-minute average and maximum details for 6 weeks,
242      and 1-day aggregated stats for 2 years -->
243     <param name="rrd-create-rra">
244       RRA:AVERAGE:0.5:1:4032
245       RRA:AVERAGE:0.5:6:2016     RRA:MAX:0.5:6:2016
246       RRA:AVERAGE:0.5:288:732    RRA:MAX:0.5:288:732
247     </param>
248
249     <!-- if no updates are received for 30 minutes, consider the datasource
250          unknown, i.e. dead -->
251     <param name="rrd-create-heartbeat" value="500"/>
252
253     <param name="rrd-create-min" value="0"/>
254     <param name="rrd-create-max" value="U"/>
255
256     <param name="rrd-hwpredict" value="disabled" />
257
258     <!-- Optional Holt-Winters algorithm parameters
259       Default values are:
260         alpha=0.1, beta=0.0035, gamma=0.1,
261         window_length=9, failure_threshold=6 -->
262     <param name="rrd-create-hw-alpha" value="0.1" />
263     <param name="rrd-create-hw-beta" value="0.0035" />
264     <param name="rrd-create-hw-gamma" value="0.1" />
265     <param name="rrd-create-hw-winlen" value="9" />
266     <param name="rrd-create-hw-failth" value="6" />
267
268     <!-- Optional Holt-Winters season length.
269          Default is one-day (288 5-minute intervals) -->
270     <param name="rrd-create-hw-season" value="288" />
271
272     <!-- Mandatory length of the Holt-Winters archives.
273          Recommended same length as main 5-minutes RRA -->
274     <param name="rrd-create-hw-rralen" value="4032" />
275
276     <param name="data-file" value="%system-id%_%interface-nick%.rrd" />
277     <param name="leaf-type" value="rrd-def" />
278     <param name="rrd-cf"    value="AVERAGE" />
279
280     <!-- In other files, define the subtree of /SNMP for your routers -->
281
282   </subtree>
283 </datasources>
284
285 </configuration>