import torrus 1.0.9
[freeside.git] / torrus / xmlconfig / examples / generic-netsnmp.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (C) 2003  Shawn Ferry
4
5    File: generic-netsnmp.xml
6    Description: System monitor example for Torrus.
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
21
22   Shawn Ferry <sferry at sevenspace dot com> <lalartu at obscure dot org>
23
24   $Id: generic-netsnmp.xml,v 1.1 2010-12-27 00:04:28 ivan Exp $
25   @(#) 10/18/03 generic-netsnmp.xml 1.2 (10/18/03 18:33:14) sferry
26 -->
27 <!--
28    This is the example of using templates from vendor and generic definition
29    files:
30    generic/rfc1213.xml, generic/rfc2790.host-resources.xml,
31    vendor/ucd-snmp.xml
32
33    This file can be used as an example for any host using ucd-snmp
34
35    You are encouraged to look at one of the tree-<name> configurations.
36
37 -->
38 <configuration>
39   <datasources>
40     <!--
41       Apply the one-minute-period template, which sets the collector period
42       to one minute and uses the appropriate RRA values for the period
43     -->
44     <!-- The top subtree for for the Generic Tree-->
45     <subtree name="Generic">
46       <apply-template name="snmp-defaults"/>
47       <!--
48           Set the snmp community port and version
49           All of these settings override any previously
50           set values and are in effect for everything
51           inside this subtree
52         -->
53       <param name="snmp-community" value="public"/>
54       <param name="snmp-port" value="191"/>
55       <param name="snmp-version" value="1"/>
56       <param name="domain-name" value=""/>
57
58       <!-- Set the data-dir for rrd files created because of this subtree
59           I use a directory per tree and a directory per host. The directories
60           must be manually created -->
61       <param name="data-dir">
62           /usr/local/torrus-data/generic/snmp/%system-id%
63       </param>
64
65       <!-- This subtree wraps up the applied configuration for "SolarisHost"
66            It is also appropriate for most net/ucd snmp hosts -->
67       <subtree name="SolarisHost">
68         <apply-template name="one-minute-period"/>
69
70         <!-- Text to display while showing this tree -->
71         <param name="legend">
72             Location: System Localtion ; Contact: System Contact
73         </param>
74
75         <!-- The IP address of the host that is being queried -->
76         <param name="snmp-host" value="127.0.0.1"/>
77         <!--
78             Apply the template named ucd-snmp
79             ucd-snmp attempts to capture and graph system memory
80                 blockio and system/processor information(similar to vmstat)
81                 it is actually a wrap up of  the following templates
82                 ucd-memory, ucd-blockio, ucd-context_interrupts
83           -->
84         <apply-template name="ucd-snmp"/>
85
86         <!-- Apply the template named rfc2790.host-resources
87                 rfc2790.host-resources, wraps up the template
88                 hrsystem, which attempts to graph the number of users
89                 and processes on a system.
90           -->
91         <apply-template name="rfc2790.host-resources"/>
92
93         <!-- The Storage Subtree, it is not required that a tree exist
94              at this level -->
95         <subtree name="Storage">
96
97           <!-- the root filesystem -->
98           <subtree name="root">
99
100             <!-- the string that is returned for hrStorageDescr -->
101             <param name="storage-description" value="/"/>
102
103             <!-- The Name of the file system without any special characters
104                  Used to create the datafile -->
105             <param name="filesystem" value="root"/>
106
107             <!-- Apply the template hrstorage -->
108             <apply-template name="hrstorage"/>
109           </subtree>
110
111           <subtree name="tmp">
112             <param name="storage-description" value="/tmp"/>
113             <param name="filesystem" value="tmp"/>
114             <apply-template name="hrstorage"/>
115           </subtree>
116
117           <subtree name="var">
118             <param name="storage-description" value="/var"/>
119             <param name="filesystem" value="var"/>
120             <apply-template name="hrstorage"/>
121           </subtree>
122
123           <subtree name="opt">
124             <param name="storage-description" value="/opt"/>
125             <param name="filesystem" value="opt"/>
126             <apply-template name="hrstorage"/>
127           </subtree>
128
129         </subtree>
130
131         <!-- Interfaces -->
132         <!-- The NetworkInterfaces Subtree, it is not required that a
133              tree exist at this level -->
134         <subtree name="NetworkInterfaces">
135
136           <!-- The network interface hme0 -->
137           <subtree name="hme0">
138             <!-- The name of the interface as returned by rfc1213_ifDescr -->
139             <param name="interface-name" value="hme0"/>
140
141             <!-- Apply the template rfc1213-interface -->
142             <apply-template name="rfc1213-interface"/>
143           </subtree>
144
145           <subtree name="qfe0">
146             <param name="interface-name" value="qfe0"/>
147             <apply-template name="rfc1213-interface"/>
148           </subtree>
149
150           <subtree name="qfe1">
151             <param name="interface-name" value="qfe1"/>
152             <apply-template name="rfc1213-interface"/>
153           </subtree>
154         </subtree>
155       </subtree>
156     </subtree>
157   </datasources>
158 </configuration>