1 # Copyright (C) 2002-2009 Stanislav Sinyagin
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
17 # $Id: snmpdiscovery.pod.in,v 1.1 2010-12-27 00:04:35 ivan Exp $
18 # Stanislav Sinyagin <ssinyagin@yahoo.com>
22 =head1 Torrus SNMP Discovery User Guide
26 In many (but not only) cases Torrus is used for SNMP monitoring.
27 It provides powerful tools which automate the process of devices' MIB
30 The discovery tools consist of two programs: C<torrus devdiscover> performs
31 the SNMP discovery, based on the discovery instructions XML file.
32 The result of its work is a new Torrus datasource configuration file.
33 Another utility, C<torrus genddx>, is a program that generates the
34 basic discovery instructions file based on a set of commandline options.
36 The device discovery XML, or as we call them DDX files, are usually
37 resided in F<@siteconfdir@/discovery/> directory. This is the default
38 path to search for them when the absolute path is not given.
40 =head2 C<torrus genddx>: Discovery instructions generator
42 Usage: torrus genddx options...
44 --host=hostname router hostname
45 --hostfile=filename space-separated router hostnames file
46 --out=outfile output file. [routers.ddx]
47 --discout=filename discovery output file [routers.xml]
48 --domain=domain optional DNS domain name
49 --version=v SNMP version [2c]
50 --community=string SNMP read community [public]
51 --port=number SNMP port [161]
52 --retries=number SNMP retries [2]
53 --timeout=number SNMP timeout [10]
54 --subtree=string Subtree name [/Routers]
55 --datadir=path data-dir parameter [@defrrddir@]
56 --holtwinters Enable Holt-Winters analysis
58 This utility generates C<devdiscover> instructions XML file (DDX) based on
59 commandline options and a plain list of SNMP agents' hostnames.
60 Hostnames are specified with one or many C<--host=hostname> options,
61 or a plain text file with space-separated hostnames.
63 Each host may have a symbolic name. This symbolic name is used as
64 the host-level subtree name. The symbolic name follows the hostname with
67 By default, the devices are placed into C</Routers/> subtree hierarchy.
68 You may change the subtree name with the I<--subtree> option.
69 Single slash as subtree name would cause host-level subtrees placed at the top
70 of the datasources tree.
72 By default, C<genddx> specifies the discovery output file as <routers.xml>,
73 and it would be placed in site XML configuration directory.
74 You most probably will change this by using the C<--discout> option.
78 torrus genddx --out=ch-langenthal.ddx \
79 --discout=ch-langenthal.xml \
80 --host=192.168.34.35:Langenthal_PE1 \
81 --host=192.168.34.36:Langenthal_PE2 \
82 --host=192.168.34.37:Langenthal_CE_Stadtverwaltung \
83 --community=blahBlah \
84 --subtree=/MPLS/CH/Bern/Langenthal
86 torrus devdiscover --in=ch-langenthal.ddx
88 B<Note:> C<genddx> is designed as a one-time utility. You may run it to create
89 a typical discovery file with basic set of options. Then the discovery
90 configuration XML would be the primary source of information, and it should
91 be maintained by manual editing, or by some other automated means.
92 Alternatively you may use C<ttproclist> utility and generate highly customized
93 discovery instruction files based on static templates and lists of SNMP nodes.
94 See L<torrus_ttproclist(@mansec_usercmd@)> manpage for more details and
99 =head2 C<torrus devdiscover>: SNMP discovery tool
101 Usage: torrus devdiscover --in=filename.ddx options... [ddx files]
103 --in=filename.ddx discovery instructions XML file(s)
104 --mkdir create data-dir directories
105 --limit=regexp limit the discovery by output files
106 --forcebundle always write the bundle file
107 --fallback=integer maximum age of XML file to fall back to
108 --threads=integer number of parallel discovery threads
109 --verbose print extra information
110 --debug print debugging information
111 --snmpdebug print SNMP protocol details
113 This utility performs the SNMP discovery of devices listed in the input
114 DDX file. The output XML file is the Torrus datasources configuration.
115 Output file name is taken from C<output-file> parameter in the DDX.
116 If the output file is not an absolute path, the file is placed
117 in the site XML configuration directory (F<@sitexmldir@>).
119 C<devdiscover> is accompanied by a number of MIB- or vendor-specific
120 modules, each responsible for finding specific SNMP variables in
121 the SNMP device, and for generating a piece of Torrus configuration XML
122 file responsible for that specific MIB. The list of supported generic MIBs and
123 vendors is constantly growing. It is quite easy to create new discovery
124 modules, and the internals are documented in
125 I<Torrus SNMP Device Discovery Developer's Guide>.
127 The output file automatically includes all required prerequisite
128 generic and vendor template definition files.
130 Behaviour of C<devdiscover> is controlled by variables in
131 F<@siteconfdir@/devdiscover-siteconfig.pl> file. Default values for
132 those variables reside in F<@cfgdefdir@/devdiscover-config.pl>.
134 For large installations, it is recommended to place RRD files into
135 a hashed directory structure. You can enable this feature by setting
137 $Torrus::DevDiscover::hashDataDirEnabled = 1;
139 in your F<devdiscover-siteconfig.pl> file.
140 Then launching C<devdiscover> with C<--mkdir> option would automatically
141 create the subdirectories inside C<data-dir>.
143 The XML files produced by C<devdiscover> may be automatically changed
144 with some local site-specific scripts. See XUpdate usage example in
145 I<Torrus User Guide>.
148 =head2 DDX, the discovery instructions file
150 The input file for C<devdiscover> is an XML file. Its DTD is available
151 in Torrus distribution in F<snmp-discovery.dtd>.
153 A typical place to store the discovery XML is F<@siteconfdir@/discovery/>.
157 <?xml version="1.0" encoding="UTF-8"?>
165 Torrus version 0.1.4d
166 This file was generated by command:
167 /usr/local/torrus-0.1/bin/genddx \
168 --discout=share/torrus/xmlconfig/myrouters.xml \
169 --community=blahblah --host=10.0.0.1 --host=10.0.1.1
170 On Tue Dec 2 17:43:30 2003
172 <param name="data-dir" value="@defrrddir@"/>
173 <param name="domain-name" value=""/>
174 <param name="host-subtree" value="/Routers"/>
175 <param name="output-file" value="myrouters.xml"/>
176 <param name="rrd-hwpredict" value="no"/>
177 <param name="snmp-community" value="blahblah"/>
178 <param name="snmp-port" value="161"/>
179 <param name="snmp-retries" value="2"/>
180 <param name="snmp-timeout" value="10"/>
181 <param name="snmp-version" value="2c"/>
183 <param name="snmp-host" value="10.0.0.1"/>
184 <param name="symbolic-name" value="10.0.0.1"/>
187 <param name="snmp-host" value="10.0.1.1"/>
188 <param name="symbolic-name" value="10.0.1.1"/>
196 =item * C<snmp-discovery>
198 Mandatory. The top-level element.
202 Mandatory. It must contain the element C<format-version>.
204 =item * C<format-version>
206 Mandatory. It must contain a format version currently
207 supported by devdiscover. Currently supported version is C<1.0>.
209 =item * C<creator-info>
211 Optional. May contain the information about the file creator: a human author
216 Some parameters are mandatory. This element defines a global or host-specific
217 parameter. Mandatory attribute C<name> identifies the parameter,
218 and the value is taken eother from C<value> attribute, or from the
219 textual content of the element.
221 C<param> element should be the child element of C<snmp-discovery> for global
222 parameters or C<host> for host-level parameters. Host-level parameters
223 override the values of global parameters.
225 These parameters are for C<devdiscover> only. They are not Torrus configuration
226 parameters, although some of them are directly copied into the generated
231 Mandatory. Defines a host to run SNMP discovery.
236 =head3 Common parameters
240 =item * C<collector-period>, C<collector-timeoffset>,
241 C<collector-dispersed-timeoffset>, C<collector-timeoffset-min>,
242 C<collector-timeoffset-max>, C<collector-timeoffset-step>,
243 C<monitor-period>, C<monitor-timeoffset>
245 Optional. When defined, these parameters override those from C<snmp-defaults>
246 template in F<snmp-defs.xml>.
248 =item * C<output-file>
250 Mandatory. Specifies the output filename for generated Torrus configuration.
251 If it's a relative path, the file is placed in F<@sitexmldir@> directory.
253 =item * C<output-bundle>
255 Optional. Specifies a comma-separated list of XML file names for bundle
256 output. Each bundle file will contain E<lt>includeE<gt> statement for each
257 corresponding C<output-file>.
259 =item * C<snmp-ipversion>, C<snmp-transport>, C<snmp-port>,
260 C<snmp-community>, C<snmp-version>, C<snmp-timeout>,
261 C<snmp-retries>, C<snmp-host>, C<snmp-username>, C<snmp-authkey>,
262 C<snmp-authpassword>, C<snmp-authprotocol>, C<snmp-privkey>,
263 C<snmp-privpassword>, C<snmp-privprotocol>
265 Mandatory SNMP session parameters. Authentication parameters depend on the
266 SNMP version used. See the I<XML Configuration Guide> for details.
267 These parameters define the SNMP agent properties and are
268 copied one-to-one to the output configuration.
270 =item * C<domain-name>
272 Optional. Defines a DNS domain name to be appended to C<snmp-host>.
274 =item * C<snmp-localaddr> and C<snmp-localport>
276 Optional parameters specifying the local socket binding address and port.
280 Mandatory. Defines the directory path where RRD files for this host
281 are stored. In case if hashed directories are enabled, C<data-dir> specifies
282 the base path under which the hashed subdirectories are created.
284 =item * C<symbolic-name>
286 Optional. Determines the host-specific subtree name. If not specified,
287 the subtree is named by C<system-id>, or by C<snmp-host> if system ID is
292 Optional. If defined, it overrides the default value of system ID, which
293 is equal to the value of C<snmp-host>.
295 =item * C<nodeid-device>
297 Optional. Defines the host-specific reference for I<nodeid>. Default value
298 is equal to C<system-id>.
300 =item * C<snmp-oids-per-pdu>
302 Optional. When defined, these parameters overwrites the value from the
303 template and vendor-specific discovery modules.
305 =item * C<snmp-check-sysuptime>
307 Optional. Default: C<yes>. Devdiscover sets this parameter to C<no> when it
308 finds SNMPv2-MIB::sysUpTime variable unavailable in the device.
310 =item * C<snmp-max-msg-size>
312 Optional. If defined, it sets the SNMP maximum message size different from
313 default. The default value is 1470 (defined in Net::SNMP).
315 =item * C<host-subtree>
317 Optional. Defines the datasourse tree path under which the host-specific
320 =item * C<rrd-hwpredict>
322 Optional. Valid values: C<yes>, C<no>. Determines if Holt-Winters forecasting
323 should be enabled for the given host.
325 =item * C<disable-devtypes>
327 Optional. Comma-separated list of discovery device types that need to be
328 excluded from discovery process. For example, ATMEL appliances conflict with
329 Empire SystemEdge MIBs, and you need to disable C<EmpireSystemedge> module
330 in order to run the discovery on those appliances.
332 =item * C<only-devtypes>
334 Optional comma-separated list of device types. If defined, only the specified
335 types will be used for device probing.
337 =item * C<host-aliases>
339 Optional comma-separated list of alias paths for a given host. Aliases
340 must be unique for each host.
342 =item * C<custom-host-templates>
344 Optional comma-separated list of template names that will be applied
345 to the resulting XML configuration at the host level.
347 =item * C<include-files>
349 Optional comma-separated list of XML files that will be listed in C<include>
350 statements in the resulting XML output.
353 =item * C<host-copy-params>
355 Optional comma-separated list of parameter names that should be copied
356 from the discovery configuration file to the generated Torrus configuration
361 Optional comma-separated list of object selectors. They are explained in more
364 =item * C<disable-snmpcollector>
366 When set to C<yes>, this parameter disables SNMP collection for this
367 host. It is useful for creating custom views, in conjunction with
368 C<RFC2863_IF_MIB::only-interfaces> parameter.
370 =item * C<define-tokensets>
372 Semicolon-separated (;) list of pairs of tokenset names and descriptions.
373 Each tokenset name is followed by colon (:) and the description text:
375 <param name="define-tokensets">
376 important-graphs: Important Graphs;
377 unimportant-graphs: Unimportant Graphs
380 =item * C<suppress-legend>
382 if set to C<yes>, the legend is not shown. It usually has uptime,
383 software version, and contact information for the SNMP device.
387 Sets the comment string for the host.
389 =item * C<show-recursive>
391 Default: C<yes>. When set to C<no>, the link to the recursive view at the
392 host level is omitted.
394 =item * C<template-registry-overlays>
396 If defined, this should be a comma-separated list of template registry
397 entries that override the default template references. The overlaying
398 templates should be referred in
399 C<%Torrus::DevDiscover::templateOverlays>.
400 For example, we want to redefine the interface counter template. Then
401 in the DDX file, we set
403 <param name="template-registry-overlays" value="my_ifcounters"/>
405 Then in F<devdiscover-siteconfig.pl> we set
407 %Torrus::DevDiscover::templateOverlays = {
409 'RFC2863_IF_MIB::iftable-octets' => {
410 'name' => 'my-iftable-octets',
411 'source' => 'mycustom-rfc2863.if-mib.xml'
413 'RFC2863_IF_MIB::ifxtable-hcoctets' => {
414 'name' => 'my-ifxtable-hcoctets',
415 'source' => 'mycustom-rfc2863.if-mib.xml'
423 =head3 Parameters for C<RFC2863_IF_MIB>
425 This discovery module is responsible for agent's interfaces table and
426 interface counters. Recognized optional parameters are:
430 =item * C<RFC2863_IF_MIB::suppress-hc-counters>
432 Some agents do not implement 64-bit counters correctly. When this parameter
433 is set to C<yes>, 64-bit interface counters are not used for the host.
434 For Cisco IOS devices, the C<CiscoIOS> discovery module tries to detect
435 such situation automatically.
437 =item * C<RFC2863_IF_MIB::subtree-name>
439 Defines the child subtree name within host-level subtree where interface
440 counters are located. Default: C<Interface_Counters>.
442 =item * C<RFC2863_IF_MIB::subtree-comment>
444 Defines the comment string for interface counters subtree.
445 Default: I<Interface traffic and error counters>.
447 =item * C<RFC2863_IF_MIB::list-admindown-interfaces>
449 If set to C<yes>, interfaces with ifAdminStatus set to other than up(1)
450 are included in the discovery results.
451 By default, such interfaces are not listed.
453 =item * C<RFC2863_IF_MIB::list-notpresent-interfaces>
455 If set to C<yes>, the interfaces with ifOperStatus status set to notPresent(6)
456 are included in the discovery results. By default, such interfaces are
459 =item * C<RFC2863_IF_MIB::exclude-down-interfaces>
461 If set to C<yes>, the interfaces with ifOperStatus equal to down(2)
462 are excluded from the discovery results.
464 =item * C<RFC2863_IF_MIB::exclude-interfaces>
466 Comma-separated list of interface names which should be excluded from
467 configuration. Spaces are allowed between the names and commas.
468 The names should be the ones that are used for interface subtrees.
470 =item * C<RFC2863_IF_MIB::only-interfaces>
472 If defined, this parameter specifies the list of interfaces that will be
473 included in the discovery results. The names should match the interface
474 subtree names. Caution: if specified incorrectly, this parameter may
475 disable discovery for all interfaces on a device.
477 =item * C<RFC2863_IF_MIB::tokenset-members>
479 This parameter defines which interfaces' C<InOut_bps> leaves to add to
480 which tokensets. The value is a semicolon-separated (;) list of
481 entries of form I<tset:interface,interface>, where I<tset> is a name of the
482 tokenset, and the I<interface> is the subtree name of the corresponding
483 interface. The token sets must be defined elsewhere in Torrus configuration.
487 <param name="snmp-host" value="192.168.49.131"/>
488 <param name="RFC2863_IF_MIB::tokenset-members">
489 clusters: 10_1, 10_2;
494 Alternatively, this parameter can be defined at the global level,
495 and then each interface should be pretended by the SNMP host name (the same as
496 in C<snmp-host> parameter) and slash sign (/):
498 <param name="RFC2863_IF_MIB::tokenset-members">
499 clusters: RTR01/Ethernet0_0, RTR01/FastEthernet2_1;
503 =item * C<RFC2863_IF_MIB::copy-params>
505 Optional comma-separated list of parameter names that would be copied
506 to the output Torrus configuration at interface level.
507 For each parameter I<param>, the value for a particular interface I<intf>
508 will be taken from parameter C<RFC2863_IF_MIB::I<param>::I<intf>> in
509 the discovery configuration file. Example:
512 <param name="snmp-host" value="192.168.49.131"/>
513 <param name="RFC2863_IF_MIB::copy-params" value="intf-error-threshold"/>
514 <param name="RFC2863_IF_MIB::intf-error-threshold::10_1" value="300"/>
515 <param name="RFC2863_IF_MIB::intf-error-threshold::2_1" value="900"/>
518 =item * C<RFC2863_IF_MIB::ifindex-map-hint>
520 Optional. For a device that doesn't have a corresponding vendor-specific
521 discovery module, this parameter would advice C<devdiscover> how to build
522 C<ifTable> index mapping. By default, the interfaces are mapped by
523 C<ifDescr> variables. For many vendors, this would not give reliable
524 mapping. Valid values are: C<ifName>, C<ifPhysAddress>, and C<ifIndex>.
525 The first two suggest the mapping by corresponding SNMP variables, and
526 the third one should be used for devices with fixed C<ifIndex> layout: in
527 this case, the C<ifIndex> values are recorded as they are at the moment of
528 discovery. This option is ignored if the device is supported by a vendor
529 specific discovery module.
531 =item * C<RFC2863_IF_MIB::subtree-name-hint>
533 Optional. By default, per-interface subtrees are named after the values of
534 C<ifDescr> SNMP variables. If this option is set to C<ifName>, this
535 SNMP variable would be used for subtree naming. This option is ignored if
536 the device is supported by a vendor specific discovery module.
538 =item * C<RFC2863_IF_MIB::nodeid-hint>
540 Optional. By default, per-interface I<nodeid> is derived from
541 C<RFC2863_IF_MIB::ifindex-map-hint>. This parameter can change the
542 reference table for nodeid. Valid values are:
543 C<ifDescr>, C<ifName>, C<ifAlias>, C<ifIndex>.
546 =item * C<RFC2863_IF_MIB::noout>
548 If set to C<yes>, all the interface statistics are skipped from
549 the XML configuration output. Still the interface table is examined and
550 the results may be used by other discovery modules.
552 =item * C<RFC2863_IF_MIB::bandwidth-usage>
554 If set to C<yes>, the bandwidth usage percentage will be shown for those
555 interfaces where two parameters are defined (in megabits per second):
556 C<bandwidth-limit-in> and C<bandwidth-limit-out>. These interface
557 parameters may be set by C<RFC2863_IF_MIB::bandwidth-limits> discovery
558 parameter, or by selectors with the action C<Parameters>, or by
559 setting C<RFC2863_IF_MIB::copy-params>.
561 =item * C<RFC2863_IF_MIB::bandwidth-limits>
563 Defines the values (in megabits per second) for C<bandwidth-limit-in> and
564 C<bandwidth-limit-out> interface parameters. Semicolon-separated list
565 of (I<Inteface name>:I<Input limit>:I<Output limit>) values, for example:
568 <param name="snmp-host" value="10.1.1.5"/>
569 <param name="symbolic-name" value="bsr2k.example.net"/>
570 <param name="output-file" value="bsr2k.example.net.xml"/>
571 <param name="RFC2863_IF_MIB::bandwidth-usage" value="yes" />
572 <param name="RFC2863_IF_MIB::bandwidth-limits">
573 ethernet0_0:10:10; ethernet0_1:20:20;
578 =item * C<RFC2863_IF_MIB::traffic-summaries>,
579 C<RFC2863_IF_MIB::traffic-XXX-path>, C<RFC2863_IF_MIB::traffic-XXX-comment>,
580 C<RFC2863_IF_MIB::traffic-XXX-interfaces>
582 Defines traffic summary graphs. A summary graph presents a sum of
583 traffic from several interfaces. The interfaces can belong to different
584 hosts, but then these hosts should have the same C<output-file> parameter
585 value. C<RFC2863_IF_MIB::traffic-summaries> defines a list of summary names,
586 C<RFC2863_IF_MIB::traffic-XXX-path> specifies the full path in the
587 datasource tree to display the graph, optional
588 C<RFC2863_IF_MIB::traffic-XXX-comment> defines a descriptive comment
589 for the graph, and C<RFC2863_IF_MIB::traffic-XXX-interfaces> lists the
590 interfaces that comprise this sum. The interfaces can be defined at the host
591 level in the form C<name, name, ...> or at the global level in the form
592 C<host/intf, host/intf, ...>. Example:
594 <param name="RFC2863_IF_MIB::traffic-summaries" value="sum1" />
595 <param name="RFC2863_IF_MIB::traffic-sum1-path" value="/Summary/Sum1" />
596 <param name="RFC2863_IF_MIB::traffic-sum1-comment" value="Test summary" />
599 <param name="snmp-host" value="router1.network.net"/>
600 <param name="RFC2863_IF_MIB::traffic-sum1-interfaces"
601 value="GigabitEthernet0_2" />
602 <param name="output-file" value="TEST/core.xml"/>
606 <param name="snmp-host" value="router2.network.net"/>
607 <param name="RFC2863_IF_MIB::traffic-sum1-interfaces"
608 value="GigabitEthernet1_0" />
609 <param name="output-file" value="TEST/core.xml"/>
615 =head3 Other generic MIB parameters
619 =item * C<RFC2790_HOST_RESOURCES::sysperf-subtree-name>
621 Defines the child subtree name within host-level subtree where system CPU
622 and memory statistics are located. Default: C<System_Performance>.
624 =item * C<RFC2670_DOCS_IF::upstreams-only>
626 If set to C<yes>, only the DOCSIS upstream statistics are enabled, and
627 downstream and MAC layer stats are skipped.
631 =head3 Vendor parameters
635 =item * C<Arbor_E::disable-bundle-offer>,
636 C<Arbor_E::disable-bundle-offer-deny>,
637 C<Arbor_E::disable-bundle-offer-pktsize>,
638 C<Arbor_E::disable-bundle-offer-rate>,
639 C<Arbor_E::disable-bundle-offer-subcount>, C<Arbor_E::disable-flowdev>,
640 C<Arbor_E::enable-bundle-name-rrd>,
641 C<Arbor_E::disable-e30-buffers>, C<Arbor_E::disable-e30-bundle>,
642 C<Arbor_E::disable-e30-cpu>,
643 C<Arbor_E::disable-e30-fwdTable>,
644 C<Arbor_E::disable-e30-fwdTable-login>,
645 C<Arbor_E::disable-e30-hdd>, C<Arbor_E::enable-e30-hdd-errors>,
646 C<Arbor_E::disable-e30-hdd-logs>, C<Arbor_E::disable-e30-l2tp>,
647 C<Arbor_E::disable-e30-mem>, C<Arbor_E::enable-e30-mempool>,
648 C<Arbor_E::disable-e30-bundle>, C<Arbor_E::disable-e30-bundle-deny>,
649 C<Arbor_E::disable-e30-bundle-rate>, C<Arbor_E::disable-e30-slowpath>
651 When set to C<yes>, the corresponding statistics are included or excluded from
654 =item * C<Arbor_E::enable-e30-bundle-name-rrd>
656 When set to C<yes>, the data will be written to filenames based on the name
657 bundle instead of by the ID of the bundle.
659 =item * C<Apple_AE::disable-clients-stats>
661 When set to C<yes>, wireless client machines are not tracked.
663 =item * C<CiscoGeneric::disable-cpu-stats>
665 When set to C<yes>, Cisco CPU usage statistics are excluded from discovery.
667 =item * C<CiscoGeneric::disable-memory-pools>
669 When set to C<yes>, Cisco memory pool usage statistics are excluded from
670 discovery. For Cisco series 7500, see the note in the
671 I<Torrus Vendor Support List>.
673 =item * C<CiscoGeneric::disable-sensors>
675 When set to C<yes>, Cisco temperature sensors are excluded from discovery.
677 =item * C<CiscoGeneric::use-fahrenheit>
679 When set to C<yes>, Cisco temperature sensors are recorded and displayed
680 in degrees Fahrenheit.
682 =item * C<CiscoGeneric::file-per-sensor>
684 When set to C<yes>, Cisco temperature sensor values are stored in
685 a separate RRD file per sensor ID. This is useful for modular big routers
688 =item * C<CiscoGeneric::disable-psupplies>
690 if set to C<yes>, Cisco power supply statistics are not collected.
692 =item * C<CiscoGeneric::power-monitor>
694 Name of the power supply monitor for Cisco devices.
696 =item * C<CiscoIOS::enable-membuf-stats>
698 When set to C<yes>, Cisco memory buffer statistics are included to the
699 discovery. Many IOS releases report faulty information, thus these
700 stats are disabled by default.
702 =item * C<CiscoIOS::disable-ipsec-stats>
704 When set to C<yes>, IPSec statistics are excluded from discovery.
706 =item * C<CiscoIOS::disable-bgp-stats>
708 If set to C<yes>, BGP statistics are not included.
710 =item * C<CiscoIOS::enable-vlan-interfaces>
712 When set to C<yes>, the interfaces VlanXXX are added to statistics.
713 By default they are not included, because some hardware platforms give
714 irrelevant counter statistics.
716 =item * C<CiscoIOS::enable-unrouted-vlan-interfaces>
718 When set to C<yes>, the interfaces "unrouted Vlan XXX" are added to statistics.
719 By default they are not included, because some hardware platforms provide
720 no statistics for such interfaces.
723 =item * C<CiscoCatOS::suppress-noname-ports>
725 When set to C<yes>, only those Catalyst ports are included in configuration
726 which have a port name (set up by C<set port name> command).
728 =item * C<CiscoIOS_MacAccounting::bgponly>
730 When set to C<yes>, Cisco MAC accounting statistics will be enabled for
731 those MACs which correspond to BGP peers only.
733 =item * C<bgp-as-description-NNNN>
735 Specifies a description for an autonomous system number. Currently it's used
736 with Cisco MAC accounting and Cisco BGP statistics only.
738 =item * C<peer-ipaddr-description-AAA_AAA_AAA_AAA>
740 Specifies a description for a peer by its IP address. Dots in IP address should
741 be replaced with underscores. Currently it's used with Cisco
742 MAC accounting and Cisco BGP statistics only.
744 =item * C<CiscoIOS_MacAccounting::tokenset-members>
746 Works the same way as C<RFC2863_IF_MIB::tokenset-members> and assigns MAC
747 accounting peers to tokensets.
749 =item * C<CiscoIOS::disable-car-stats>
751 When set to C<yes>, the Committed Access Rate statistics are disabled
754 =item * C<CiscoIOS::disable-vpdn-stats>
756 When set to C<yes>, the VPDN (Virtual Private Dial-up Network) statistics
757 are disabled from discovery.
759 =item * C<CiscoIOS::short-device-comment>
761 If set to C<yes>, the Hw Serial and Revision strings are not shown in
764 =item * C<CiscoSCE::disable-disk>, C<CiscoSCE::disable-gc>,
765 C<CiscoSCE::disable-qos>, C<CiscoSCE::disable-rdr>,
766 C<CiscoSCE::disable-subs>, C<CiscoSCE::disable-tp>
768 If set to C<yes>, the corresponding statistics are excluded from Cisco SCE
771 =item * C<FTOS::disable-cpu>, C<FTOS::disable-power>,
772 C<FTOS::disable-temperature>
774 When set to C<yes>, disables the corresponding statistics category.
776 =item * C<FTOS::use-fahrenheit>, C<FTOS::file-per-sensor>
778 When set to C<yes>, enables the user of fahrenheit temperature, or writes
781 =item * C<JunOS::disable-cos>, C<JunOS::disable-cos-red>,
782 C<JunOS::disable-cos-tail>, C<JunOS::disable-firewall>,
783 C<JunOS::disable-operating>, C<JunOS::disable-rpf>
785 When set to C<yes>, disables the corresponding statistics category for JunOS
788 =item * C<Liebert::disable-temperature>, C<Liebert::disable-humidity>,
789 C<Liebert::disable-state>, C<Liebert::disable-stats>
791 When set to C<yes>, disable the corresponding statistics category for Liebert
794 =item * C<Liebert::use-fahrenheit>
796 When set to C<yes>, the temperature readings will be in fahrenheit.
799 =item * C<NetBotz::temp-max>, C<NetBotz::humi-max>, C<NetBotz::dew-max>
801 Set a numeric value for the maximum temperature, humidity, or dew point
802 on NetBotz sensor graphs. The maximum is displayed with a dark red line.
804 =item * C<Paradyne::slot-name>
806 Mandatory for Paradyne DSLAM devices. It should uniquely identify
807 the slot within the device. Any sequence of word characters is allowed.
811 See also: I<Torrus Vendor Support List> for the list of supported MIBs and
814 =head2 Object selectors
816 Selectors are a common mechanism for applying customizations to
817 some discovery objects. For example, you may want to apply a monitor
818 to byte counters of interfaces that have a special word in the description.
819 Or apply Holt-Winters prediction to a certain subset of interfaces.
821 Selectors are defined in a DDX file as regular parameters.
822 The parameter C<selectors> defines a list of selector names.
823 Each selector is identifed by its name and type. The type of selector
824 defines which objects will be searched: IF-MIB interfaces, or Cisco
825 temperature sensors, or something else. The parameters are described
832 Comma-separated list of selector names. Further below we use C<S> as
833 selector name, C<A> as attribute name, and C<T> as action name.
835 =item * C<S-selector-type>
837 Type of objects to be selected. Supported values are: C<RFC2863_IF_MIB>,
838 C<CiscoCPU>, C<CiscoSensor>.
840 =item * C<S-selector-expr>
842 An RPN (reverse Polish notation) expression that defines the
843 object attributes to be checked and relation between them. Attribute names
844 should be specified in curly braces ({}). The rest of the syntax is described
845 in I<RPN expressions in Torrus> guide. The attribute names are specific to the
846 selector type and are described below.
850 For a given selector name C<S> and attribute name C<A>,
851 this parameter defines the attribute value that should be compared
852 to the object's properties. In most cases it defines a regular
853 expression that should match the value of a corresponding object's
856 =item * C<S-selector-actions>
858 For a given selector name C<S>, this parameter defines a comma-separated
859 list of actions to be applied for objects where C<S-selector-expr> returns
860 true. The action names are specific to the selector type and are
865 For a given selector C<S> and action C<T>, this parameter defines
866 an argument that should be passed to the action. Each action
867 defines its own meaning of the argument.
873 =head3 RFC2863_IF_MIB selector
875 This type of selector selects the network interfaces on a SNMP device.
876 The following attribute names are supported:
880 =item * C<ifSubtreeName>, C<ifSubtreeName1>, ...
882 Interface-level subtree name as you see it in the discovery results.
883 You can compose a complex expression of subtree matches, by
884 createing attributes with different numbers at the end.
888 Comment string that is defined in C<comment> parameter. It is
889 usually derived from an interface description.
893 Numeric IANA interface type, as returned by C<ifType> SNMP variable.
897 C<ifType> is compared numerically.
898 C<ifSubtreeName> and C<ifComment> are regular expressions.
899 C<ifSubtreeName> accepts multiple expressions separated by space,
900 and the selector matches if any of these expressions matches the subtree name.
904 The following actions are supported:
908 =item * C<InBytesMonitor>, C<OutBytesMonitor>
910 The argument defines the monitor name to be applied to the input
911 or output bytes counter.
913 =item * C<InDiscardsMonitor>, C<OutDiscardsMonitor>,
914 C<InErrorsMonitor>, C<OutErrorsMonitor>
916 The argument defines the monitor name to be applied to discard and error
917 counters that are discovered for a given interface.
919 =item * C<NotifyPolicy>
921 The argument defines the value for C<notify-policy> parameter. See the manual
922 for F<action_notify> for more details.
924 =item * C<HoltWinters>
926 No argument needed. This action enables Holt-Winters prediction
927 for given interface's counters.
929 =item * C<NoPacketCounters>, C<NoDiscardCounters>, C<NoErrorCounters>
931 No argument needed. The action disables the packet, discard or error counters
932 for a given interface to be collected.
934 =item * C<TokensetMember>
936 The argument is a comma-separated list of tokenset names where C<InOutBbs>
937 graphs would be added. This action complements
938 C<RFC2863_IF_MIB::tokenset-members>.
940 =item * C<Parameters>
942 The argument defines additional configuration parameters to be
943 placed at the interface level. The value should be one
944 or several C<param=value> pairs separated by semicolon (;).
945 Parameters defined in C<RFC2863_IF_MIB::copy-params> may override
946 the ones defined in this action.
948 =item * C<InBytesParameters>, C<OutBytesParameters>
950 Analagous to C<Parameters>, but the parameters are applied to InBytes and
951 OutBytes leaves of the selected interface.
953 =item * C<DocsisUpSNRMonitor>
955 For a DOCSIS CMTS, this action assigns a new monitor to the upstream
956 Signal/Noise ratio gauge, instead of the default monitor.
958 =item * C<DocsisUpSNRTokenset>
960 For a DOCSIS CMTS, this action adds the Signal/Noise ratio graph to a
963 =item * C<DocsisUpFECCorMonitor>
965 For a DOCSIS CMTS, this action assigns a monitor to the C<Correctable>
966 counter of the upstream FEC statistics.
968 =item * C<DocsisUpFECUncorMonitor>
970 For a DOCSIS CMTS, this action assigns a monitor to the C<Uncorrectable>
971 counter of the upstream FEC statistics.
973 =item * C<DocsisDownUtilMonitor>
975 For a DOCSIS CMTS, this action assigns a monitor to the downstream
976 C<UsedBytes> counter.
978 =item * C<DocsisMacModemsMonitor>
980 For Cisco uBR, this action assigns a monitor to the C<Modems_Registered> gauge
981 in the MAC layer stats.
983 =item * C<DocsisUpUtilMonitor>, C<DocsisUpSlotsMonitor>
985 For Cisco uBR, this action assigns a monitor to upstream utilization and
986 free contention timeslots gauges correspondingly.
991 =head3 CiscoCPU selector
993 A selector of this type selects CPU statistics Cisco router or
996 The attributes supported are: C<CPUName> and C<CPUDescr>, and their
997 values are regular expressions that should match the CPU name or description,
998 as discovered by C<devdiscover>.
1000 The action supported is C<TokensetMember>, and its argument specifies
1001 the tokenset where to place the CPU statistics graph.
1004 =head3 CiscoSensor selector
1006 A selector of this type selects temperature sensors on a Cisco router or
1009 The only attribute supported is C<SensorDescr>, and its value is a regular
1010 expression that should match the sensor description, as discovered
1013 Actions supported: C<Monitor>, C<TokensetMember>.
1016 =head3 ALU_SAP selector
1018 This selector type is designed for SAP entries in Alcatel-Lucent ESS and SR
1021 Attributes supported: C<sapDescr> (regexp), C<custDescr> (regexp),
1022 C<sapName> (exact match), C<sapPort> (exact match).
1024 Actions supported: C<RemoveSAP> (excludes a selected SAP from the datasources).
1030 The following example applies a monitor called C<temp60degrees> to all
1031 inlet sensors on a Cisco device:
1034 <param name="snmp-host" value="router1"/>
1035 <param name="output-file" value="router1.xml"/>
1036 <param name="selectors" value="inlet"/>
1037 <param name="inlet-selector-type" value="CiscoSensor"/>
1038 <param name="inlet-selector-expr" value="{SensorDescr}"/>
1039 <param name="inlet-SensorDescr" value="Inlet"/>
1040 <param name="inlet-selector-actions" value="Monitor"/>
1041 <param name="inlet-Monitor-arg" value="temp60degrees"/>
1044 The following example enables Holt-Winters prediction and specifies some
1045 parameters to all FastEthernet interfaces which have the string "SRV-ID"
1046 in their descriptions:
1049 <param name="snmp-host" value="router2"/>
1051 <param name="selectors" value="FastEthHW"/>
1052 <param name="FastEthHW-selector-type" value="RFC2863_IF_MIB"/>
1054 <param name="FastEthHW-selector-expr"
1055 value="{ifSubtreeName},{ifComment},AND"/>
1056 <param name="FastEthHW-ifSubtreeName" value="^FastEthernet"/>
1057 <param name="FastEthHW-ifComment" value="SRV-ID"/>
1059 <param name="FastEthHW-selector-actions"
1060 value="HoltWinters,Parameters"/>
1062 <param name="FastEthHW-Parameters-arg"
1063 value="rrd-create-hw-alpha=0.2; rrd-create-hw-beta=0.01"/>
1066 The following example sets up the monitors defined in
1067 F<examples/docsis-monitors.xml>:
1069 <param name="selectors" value="docs"/>
1070 <param name="docs-selector-type" value="RFC2863_IF_MIB"/>
1071 <param name="docs-selector-expr" value="{ifSubtreeName}"/>
1072 <param name="docs-ifSubtreeName" value="^Cable"/>
1073 <param name="docs-selector-actions">
1075 DocsisUpFECCorMonitor,
1076 DocsisUpFECUncorMonitor,
1077 DocsisDownUtilMonitor,
1078 DocsisMacModemsMonitor,
1079 DocsisUpUtilMonitor,
1080 DocsisUpSlotsMonitor,
1084 <param name="docs-DocsisUpSNRMonitor-arg"
1085 value="docsis-snr-1,docsis-snr-2,docsis-snr-3"/>
1087 <param name="docs-DocsisUpFECCorMonitor-arg"
1088 value="docsis-feccor-1,docsis-feccor-2"/>
1090 <param name="docs-DocsisUpFECUncorMonitor-arg"
1091 value="docsis-fecuncor-1,docsis-fecuncor-2,docsis-fecuncor-3"/>
1093 <param name="docs-DocsisDownUtilMonitor-arg"
1094 value="docsis-downutl-1,docsis-downutl-2,docsis-downutl-3"/>
1096 <param name="docs-DocsisMacModemsMonitor-arg"
1097 value="docsis-modems-1,docsis-modems-2"/>
1099 <param name="docs-DocsisUpUtilMonitor-arg"
1100 value="docsis-uputil-1,docsis-uputil-2,docsis-uputil-3"/>
1102 <param name="docs-DocsisUpSlotsMonitor-arg"
1103 value="docsis-upslots-1,docsis-upslots-2,docsis-upslots-3"/>
1105 <param name="docs-InErrorsMonitor-arg"
1106 value="docs-inerrors-1,docs-inerrors-2"/>
1108 <param name="docs-OutErrorsMonitor-arg"
1109 value="docs-outerrors-1,docs-outerrors-2"/>
1115 Copyright (c) 2002-2005 Stanislav Sinyagin E<lt>ssinyagin@yahoo.comE<gt>