summaryrefslogtreecommitdiff
path: root/torrus/xmlconfig/old/snmp-defs.old-0.1.2.xml
blob: a77b311164bfe269c0f4fd4fb46bc3ce59554f7c (plain)
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<?xml version="1.0"?>
<!--
   Copyright (C) 2002  Stanislav Sinyagin

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

  $Id: snmp-defs.old-0.1.2.xml,v 1.1 2010-12-27 00:04:28 ivan Exp $
  Stanislav Sinyagin <ssinyagin@yahoo.com>

-->

<!-- These are the basic definitions for the SNMP collector

  WARNING: This file is overwritten by "make install"
-->

<configuration>

<definitions>
  <!-- IF-MIB:ifTable  -->
  <def name="ifDescr"           value="1.3.6.1.2.1.2.2.1.2" />
  <def name="ifPhysAddress"     value="1.3.6.1.2.1.2.2.1.6" />
  <def name="ifInOctets"        value="1.3.6.1.2.1.2.2.1.10" />
  <def name="ifInUcastPkts"     value="1.3.6.1.2.1.2.2.1.11" />
  <def name="ifInErrors"        value="1.3.6.1.2.1.2.2.1.14" />
  <def name="ifOutOctets"       value="1.3.6.1.2.1.2.2.1.16" />
  <def name="ifOutUcastPkts"    value="1.3.6.1.2.1.2.2.1.17" />
  <def name="ifOutErrors"       value="1.3.6.1.2.1.2.2.1.20" />

  <!-- IF-MIB:ifXTable -->
  <def name="ifName"            value="1.3.6.1.2.1.31.1.1.1.1" />
  <def name="ifHCInOctets"      value="1.3.6.1.2.1.31.1.1.1.6" />
  <def name="ifHCInUcastPkts"   value="1.3.6.1.2.1.31.1.1.1.7" />
  <def name="ifHCOutOctets"     value="1.3.6.1.2.1.31.1.1.1.10" />
  <def name="ifHCOutUcastPkts"  value="1.3.6.1.2.1.31.1.1.1.11" />

  <!-- RFC1213-MIB:ipAddrTable -->
  <def name="ipAdEntIfIndex"   value="1.3.6.1.2.1.4.20.1.2" />

  <!-- Interface indices -->
  <def name="IFIDX_DESCR"   value="M($ifDescr, %interface-name%)" />
  <def name="IFIDX_MAC"     value="M($ifPhysAddress, %interface-mac%)" />
  <def name="IFIDX_IP"      value="V(ipAdEntIfIndex.%interface-ipaddr%)" />

  <!-- Default Interface index lookup -->
  <def name="IFIDX"         value="M(%ifindex-table%, %interface-name%)" />

</definitions>

<datasources>

  <template name="interface-counters">

    <leaf name="InOutBps">
      <param name="comment" value="Input and Output bits per second graphs" />
      <param name="vertical-label"   value="bps" />
      <param name="graph-lower-limit" value="0" />
      <param name="rrd-hwpredict"    value="disabled" />
      <param name="precedence"       value="1000" />
      <param name="ds-type"          value="rrd-multigraph" />
      <param name="ds-names"         value="in,out" />

      <param name="ds-expr-in"       value="{ifInOctets},8,*" />
      <param name="graph-legend-in"  value="Bits per second in" />
      <param name="line-style-in"    value="##BpsIn" />
      <param name="line-color-in"    value="##BpsIn" />
      <param name="line-order-in"    value="1" />

      <param name="ds-expr-out"      value="{ifOutOctets},8,*" />
      <param name="graph-legend-out" value="Bits per second out" />
      <param name="line-style-out"   value="##BpsOut" />
      <param name="line-color-out"   value="##BpsOut" />
      <param name="line-order-out"   value="2" />
    </leaf>

    <leaf name="ifInOctets">
      <param name="snmp-object"       value="$ifInOctets.$IFIDX" />
      <param name="rrd-ds"            value="ifInOctets" />
      <param name="rrd-create-dstype" value="COUNTER" />
      <param name="comment"  value="Input byte counter for the interface" />
      <param name="graph-legend"      value="Bytes in" />
      <param name="vertical-label"    value="Bps" />
      <param name="graph-lower-limit" value="0" />
    </leaf>

    <leaf name="ifInUcastPkts">
      <param name="snmp-object"       value="$ifInUcastPkts.$IFIDX" />
      <param name="rrd-ds"            value="ifInUcastPkts" />
      <param name="rrd-create-dstype" value="COUNTER" />
      <param name="comment" value="Input packet counter for the interface" />
      <param name="graph-legend"      value="Packets in" />
      <param name="vertical-label"    value="pps" />
      <param name="graph-lower-limit" value="0" />
    </leaf>

    <leaf name="ifOutOctets">
      <param name="snmp-object"       value="$ifOutOctets.$IFIDX" />
      <param name="rrd-ds"            value="ifOutOctets" />
      <param name="rrd-create-dstype" value="COUNTER" />
      <param name="comment" value="Output byte counter for the interface" />
      <param name="graph-legend"      value="Bytes out" />
      <param name="vertical-label"    value="Bps" />
      <param name="graph-lower-limit" value="0" />
    </leaf>

    <leaf name="ifOutUcastPkts">
      <param name="snmp-object"       value="$ifOutUcastPkts.$IFIDX" />
      <param name="rrd-ds"            value="ifOutUcastPkts" />
      <param name="rrd-create-dstype" value="COUNTER" />
      <param name="comment" value="Output packet counter for the interface" />
      <param name="graph-legend"      value="Packets out" />
      <param name="vertical-label"    value="pps" />
      <param name="graph-lower-limit" value="0" />
    </leaf>

  </template>

  <template name="hc-interface-counters">

    <leaf name="InOutBps">
      <param name="comment" value="Input and Output bits per second graphs" />
      <param name="vertical-label"   value="bps" />
      <param name="graph-lower-limit" value="0" />
      <param name="rrd-hwpredict"    value="disabled" />
      <param name="precedence"       value="1000" />
      <param name="ds-type"          value="rrd-multigraph" />
      <param name="ds-names"         value="in,out" />

      <param name="ds-expr-in"       value="{ifHCInOctets},8,*" />
      <param name="graph-legend-in"  value="Bits per second in" />
      <param name="line-style-in"    value="##BpsIn" />
      <param name="line-color-in"    value="##BpsIn" />
      <param name="line-order-in"    value="1" />

      <param name="ds-expr-out"      value="{ifHCOutOctets},8,*" />
      <param name="graph-legend-out" value="Bits per second out" />
      <param name="line-style-out"   value="##BpsOut" />
      <param name="line-color-out"   value="##BpsOut" />
      <param name="line-order-out"   value="2" />
    </leaf>

    <leaf name="ifHCInOctets">
      <param name="snmp-object"       value="$ifHCInOctets.$IFIDX" />
      <param name="rrd-ds"            value="ifHCInOctets" />
      <param name="rrd-create-dstype" value="COUNTER" />
      <param name="comment"  value="Input byte counter for the interface" />
      <param name="graph-legend"      value="Bytes in" />
      <param name="vertical-label"    value="Bps" />
      <param name="graph-lower-limit" value="0" />
    </leaf>

    <leaf name="ifHCInUcastPkts">
      <param name="snmp-object"       value="$ifHCInUcastPkts.$IFIDX" />
      <param name="rrd-ds"            value="ifHCInUcastPkts" />
      <param name="rrd-create-dstype" value="COUNTER" />
      <param name="comment" value="Input packet counter for the interface" />
      <param name="graph-legend"      value="Packets in" />
      <param name="vertical-label"    value="pps" />
      <param name="graph-lower-limit" value="0" />
    </leaf>

    <leaf name="ifHCOutOctets">
      <param name="snmp-object"       value="$ifHCOutOctets.$IFIDX" />
      <param name="rrd-ds"            value="ifHCOutOctets" />
      <param name="rrd-create-dstype" value="COUNTER" />
      <param name="comment" value="Output byte counter for the interface" />
      <param name="graph-legend"      value="Bytes out" />
      <param name="vertical-label"    value="Bps" />
      <param name="graph-lower-limit" value="0" />
    </leaf>

    <leaf name="ifHCOutUcastPkts">
      <param name="snmp-object"       value="$ifHCOutUcastPkts.$IFIDX" />
      <param name="rrd-ds"            value="ifHCOutUcastPkts" />
      <param name="rrd-create-dstype" value="COUNTER" />
      <param name="comment" value="Output packet counter for the interface" />
      <param name="graph-legend"      value="Packets out" />
      <param name="vertical-label"    value="pps" />
      <param name="graph-lower-limit" value="0" />
    </leaf>

  </template>

  <subtree name="SNMP">
    <param name="ds-type" value="collector" />
    <param name="collector-type" value="snmp" />

    <!-- Two mandatory parameters define the collector schedule.
         The collector runs at moments defined by formula:
           time + period - (time mod period) + timeoffset -->
    <param name="collector-period" value="300" />
    <param name="collector-timeoffset" value="10" />

    <param name="storage-type" value="rrd" />

    <param name="comment" value="Data collected via SNMP" />

    <!-- SNMP Parameters -->

    <!-- Optional SNMP version. Default is 2c.
         Valid values are: 1, 2c.
         Version 3 will be supported in the future.  -->
    <param name="snmp-version" value="2c" />

    <!-- Optional port. Deefault is 161 -->
    <param name="snmp-port" value="161" />

    <!-- Mandatory community name -->
    <param name="snmp-community" value="public" />

    <!-- Mandatory session timeout and no. of retries -->
    <param name="snmp-timeout" value="10" />
    <param name="snmp-retries" value="2" />

    <!-- Optional domain name. Appended to a hostname which
         has no dots in it -->
    <param name="domain-name" value="must.redefine.domain.net" />

    <!-- Where the interface index is looked up -->
    <param name="ifindex-table" value="$ifDescr" />

    <!-- RRD Parameters -->

    <!-- Directory path where RRD files will be stored -->
    <param name="data-dir" value="/var/snmpcollector" />

    <!-- Round-robin arrays to be created, separated by space.
     In this example, we keep 5-minute details for 2 weeks,
     30-minute average and maximum details for 6 weeks,
     and 1-day aggregated stats for 2 years -->
    <param name="rrd-create-rra">
      RRA:AVERAGE:0.5:1:4032
      RRA:AVERAGE:0.5:6:2016     RRA:MAX:0.5:6:2016
      RRA:AVERAGE:0.5:288:732    RRA:MAX:0.5:288:732
    </param>

    <!-- if no updates are received for 30 minutes, consider the datasource
         unknown, i.e. dead -->
    <param name="rrd-create-heartbeat" value="500"/>

    <param name="rrd-create-min" value="0"/>
    <param name="rrd-create-max" value="U"/>

    <param name="rrd-hwpredict" value="disabled" />

    <!-- Optional Holt-Winters algorithm parameters
      Default values are:
        alpha=0.1, beta=0.0035, gamma=0.1,
        window_length=9, failure_threshold=6 -->
    <param name="rrd-create-hw-alpha" value="0.1" />
    <param name="rrd-create-hw-beta" value="0.0035" />
    <param name="rrd-create-hw-gamma" value="0.1" />
    <param name="rrd-create-hw-winlen" value="9" />
    <param name="rrd-create-hw-failth" value="6" />

    <!-- Optional Holt-Winters season length.
         Default is one-day (288 5-minute intervals) -->
    <param name="rrd-create-hw-season" value="288" />

    <!-- Mandatory length of the Holt-Winters archives.
         Recommended same length as main 5-minutes RRA -->
    <param name="rrd-create-hw-rralen" value="4032" />

    <param name="data-file" value="%system-id%_%interface-nick%.rrd" />
    <param name="leaf-type" value="rrd-def" />
    <param name="rrd-cf"    value="AVERAGE" />

    <!-- In other files, define the subtree of /SNMP for your routers -->

  </subtree>
</datasources>

</configuration>