3 Copyright (C) 2002 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
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>
24 <!-- These are the basic definitions for the SNMP collector
26 WARNING: This file is overwritten by "make install"
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" />
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" />
49 <!-- RFC1213-MIB:ipAddrTable -->
50 <def name="ipAdEntIfIndex" value="1.3.6.1.2.1.4.20.1.2" />
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%)" />
57 <!-- Default Interface index lookup -->
58 <def name="IFIDX" value="M(%ifindex-table%, %interface-name%)" />
64 <template name="interface-counters">
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" />
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" />
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" />
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" />
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" />
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" />
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" />
130 <template name="hc-interface-counters">
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" />
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" />
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" />
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" />
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" />
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" />
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" />
196 <subtree name="SNMP">
197 <param name="ds-type" value="collector" />
198 <param name="collector-type" value="snmp" />
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" />
206 <param name="storage-type" value="rrd" />
208 <param name="comment" value="Data collected via SNMP" />
210 <!-- SNMP Parameters -->
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" />
217 <!-- Optional port. Deefault is 161 -->
218 <param name="snmp-port" value="161" />
220 <!-- Mandatory community name -->
221 <param name="snmp-community" value="public" />
223 <!-- Mandatory session timeout and no. of retries -->
224 <param name="snmp-timeout" value="10" />
225 <param name="snmp-retries" value="2" />
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" />
231 <!-- Where the interface index is looked up -->
232 <param name="ifindex-table" value="$ifDescr" />
234 <!-- RRD Parameters -->
236 <!-- Directory path where RRD files will be stored -->
237 <param name="data-dir" value="/var/snmpcollector" />
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
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"/>
253 <param name="rrd-create-min" value="0"/>
254 <param name="rrd-create-max" value="U"/>
256 <param name="rrd-hwpredict" value="disabled" />
258 <!-- Optional Holt-Winters algorithm parameters
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" />
268 <!-- Optional Holt-Winters season length.
269 Default is one-day (288 5-minute intervals) -->
270 <param name="rrd-create-hw-season" value="288" />
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" />
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" />
280 <!-- In other files, define the subtree of /SNMP for your routers -->