summaryrefslogtreecommitdiff
path: root/torrus/xmlconfig/vendor/cisco.ios.mac-accounting.xml
blob: 49bc979a3b0757e4e52c7a31ef69db904ee06f77 (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
<?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: cisco.ios.mac-accounting.xml,v 1.1 2010-12-27 00:04:24 ivan Exp $
  Stanislav Sinyagin <ssinyagin@yahoo.com>

-->

<!--
  This file defines the template for MAC accounting
  on Cisco routers. It may be useful for per-BGP peer statistics
  on an Ethernet media.

  See also "examples/cisco-mac-accounting.xml" for a working example.
 -->

<configuration>

<definitions>

  <!-- CISCO-IP-STAT-MIB:cipMacTable -->
  <def name="cipMacHCSwitchedBytes" value="1.3.6.1.4.1.9.9.84.1.2.3.1.2" />

</definitions>


<datasources>

  <template name="cisco-macacc-subtree">
    <param name="snmp-object">
      $cipMacHCSwitchedBytes.%ifindex-map%.%direction%.%peer-macoid%
    </param>
    <param name="snmp-object-type"  value="COUNTER64" />
    <param name="ext-dstype"        value="COUNTER64" />

    <param name="data-file">
      %system-id%_%interface-nick%_%peer-macaddr%_macacc.rrd
    </param>

    <param name="rrd-ds" value="%direction%" />
    <param name="rrd-create-dstype" value="COUNTER" />
    <param name="graph-title" value="%descriptive-nickname%" />
    <param name="graph-lower-limit" value="0" />

    <param name="has-overview-shortcuts" value="yes"/>
    <param name="overview-shortcuts" value="traffic"/>
    <param name="overview-subleave-name-traffic" value="InOut_bps"/>
    <param name="overview-shortcut-text-traffic"
           value="All traffic"/>
    <param name="overview-shortcut-title-traffic"
           value="Show traffic for all interfaces on one page"/>
    <param name="overview-page-title-traffic"
           value="Input/Output Graphs"/>    
  </template>


  <template name="cisco-macacc">
    <leaf name="Bytes_In">
      <param name="comment"          value="Input bytes per second" />
      <param name="direction"        value="1" />
      <param name="hidden"           value="yes" />
      <param name="graph-legend"     value="Bytes in" />
    </leaf>

    <leaf name="Bytes_Out">
      <param name="comment"          value="Output bytes per second" />
      <param name="direction"        value="2" />
      <param name="hidden"           value="yes" />
      <param name="graph-legend"     value="Bytes out" />
    </leaf>

    <leaf name="In_bps">
      <param name="comment"          value="Input bits per second" />
      <param name="ds-type"          value="rrd-file" />
      <param name="leaf-type"        value="rrd-cdef" />
      <param name="rpn-expr"         value="{Bytes_In},8,*" />
      <param name="graph-legend"     value="Bits in" />
    </leaf>

    <leaf name="Out_bps">
      <param name="comment"          value="Output bits per second" />
      <param name="ds-type"          value="rrd-file" />
      <param name="leaf-type"        value="rrd-cdef" />
      <param name="rpn-expr"         value="{Bytes_Out},8,*" />
      <param name="graph-legend"     value="Bits out" />
    </leaf>

    <leaf name="InOut_bps">
      <param name="comment" value="Input and Output bits per second graphs" />
      <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="{Bytes_In},8,*" />
      <param name="graph-legend-in"  value="Bits per second in" />
      <param name="line-style-in"    value="AREA" />
      <param name="line-color-in"    value="#00FF00" />
      <param name="line-order-in"    value="1" />

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

</datasources>

</configuration>