root/src/modules/snmp.xml

Revision dda1d9cd36433ed635c61a7b5c7c71551eab3e7e, 7.2 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 4 days ago)

Provide feature parity (sans walk) with the jezebel version of snmp.
This adds support for "separate_queries" and SNMPv3.

  • Property mode set to 100644
Line 
1 <module>
2   <name>snmp</name>
3   <description><para>The snmp module provides SNMP polling support for reconnoiter.</para></description>
4   <loader>C</loader>
5   <image>snmp.so</image>
6   <moduleconfig>
7     <parameter name="debugging"
8                required="optional"
9                default="0"
10                allowed="\d+">Enable debugging output within libnetsnmp-c.</parameter>
11   </moduleconfig>
12   <checkconfig>
13     <parameter name="community"
14                required="optional"
15                default="public"
16                allowed=".+">The SNMP community string providing read access.</parameter>
17     <parameter name="port"
18                required="optional"
19                default="161"
20                allowed="\d+">The UDP port to which SNMP queries will be sent.</parameter>
21     <parameter name="version"
22                required="optional"
23                default="2c"
24                allowed="(?:1|2c|3)">The SNMP version used for queries.</parameter>
25     <parameter name="separate_queries"
26                required="optional"
27                default="false"
28                allowed="(?:true|on|false|off)">Issue a separate query (PDU) for each OID; only applicable to v1 and v2c.</parameter>
29     <parameter name="context_name"
30                required="optional"
31                allowed=".*">The SNMPv3 context name.</parameter>
32     <parameter name="context_engine"
33                required="optional"
34                allowed="[0-9a-fA-F]+">The SNMPv3 context engine id.</parameter>
35     <parameter name="security_level"
36                required="optional"
37                default="nanp"
38                allowed="(?:nanp|anp|ap)">The SNMPv3 security level. nanp: noAuthNoPriv, anp: authNoPriv, ap, authPriv.</parameter>
39     <parameter name="security_name"
40                required="optional"
41                allowed=".*">The SNMPv3 security name (user).</parameter>
42     <parameter name="security_engine"
43                required="optional"
44                default=""
45                allowed="[0-9a-fA-F]+">The SNMPv3 security engine id.</parameter>
46     <parameter name="auth_protocol"
47                required="optional"
48                default="MD5"
49                allowed="(?:MD5|SHA)">The SNMPv3 security authorization hashing algorithm.</parameter>
50     <parameter name="auth_passphrase"
51                required="optional"
52                allowed=".*">The SNMPv3 security authorization passphrase</parameter>
53     <parameter name="privacy_protocol"
54                required="optional"
55                allowed="(?:DES|AES)">The SNMPv3 security encryption algorithm.</parameter>
56     <parameter name="privacy_passphrase"
57                required="optional"
58                allowed=".*">The SNMPv3 security privacy passphrase</parameter>
59     <parameter name="oid_.+"
60                required="optional"
61                allowed=".+">Defines a metric to query.  Key oid_foo will establish a metric called foo.  The value of the parameter should be an OID either in decimal notation or MIB name.</parameter>
62     <parameter name="type_.+"
63                required="optional"
64                allowed=".+">Defines a coercion for a metric type.  The name of the metric must identically match one of the oid_(.+) patterns. The value can be either one of the single letter codes in the metric_type_t enum or the following string variants: guess, int32, uint32, int64, uint64, double, string.</parameter>
65     <parameter name="separate_queries"
66                required="optional"
67                default="false"
68                allowed="^(?:true|false|on|off)$">Whether or not to query each OID separately.</parameter>
69   </checkconfig>
70   <examples>
71     <example>
72       <title>Simple snmp polling of two switchports</title>
73       <para>The following example configures SNMP checks against switchport 1 and 2
74       on the switch with the IP address 10.80.116.3.</para>
75       <programlisting><![CDATA[
76       <noit>
77         <modules>
78           <module image="snmp" name="snmp"/>
79         </modules>
80         <checks>
81           <switch target="10.80.116.3" module="snmp">
82             <config>
83               <community>SeKr3t</community>
84               <oid_description>IF-MIB::ifName.%[name]</oid_description>
85               <oid_alias>IF-MIB::ifAlias.%[name]</oid_alias>
86               <oid_speed>IF-MIB::ifSpeed.%[name]</oid_speed>
87               <oid_adminstatus>IF-MIB::ifAdminStatus.%[name]</oid_adminstatus>
88               <oid_operstatus>IF-MIB::ifOperStatus.%[name]</oid_operstatus>
89               <oid_inoctets>IF-MIB::ifHCInOctets.%[name]</oid_inoctets>
90               <oid_outoctets>IF-MIB::ifHCOutOctets.%[name]</oid_outoctets>
91               <oid_inerrors>IF-MIB::ifInErrors.%[name]</oid_inerrors>
92               <oid_outerrors>IF-MIB::ifOutErrors.%[name]</oid_outerrors>
93               <oid_indiscards>IF-MIB::ifInDiscards.%[name]</oid_indiscards>
94               <oid_outdiscards>IF-MIB::ifOutDiscards.%[name]</oid_outdiscards>
95               <oid_inucastpkts>IF-MIB::ifHCInUcastPkts.%[name]</oid_inucastpkts>
96               <oid_outucastpkts>IF-MIB::ifHCOutUcastPkts.%[name]</oid_outucastpkts>
97               <oid_inbcastpkts>IF-MIB::ifHCInBroadcastPkts.%[name]</oid_inbcastpkts>
98               <oid_outbcastpkts>IF-MIB::ifHCOutBroadcastPkts.%[name]</oid_outbcastpkts>
99             </config>
100             <check uuid="1b4e28ba-2fa1-11d2-883f-e9b761bde3fb" name="1"/>
101             <check uuid="4deb0724-ccee-4360-83bc-255e7b9d989d" name="2"/>
102           </switch>
103         </checks>
104       </noit>
105     ]]></programlisting>
106     </example>
107     <example>
108       <title>Example using config inheritance to show reuse</title>
109       <para>Accomplising the same goal, but by using reuse:</para>
110
111       <programlisting><![CDATA[
112       <noit>
113         <modules>
114           <module image="snmp" name="snmp"/>
115         </modules>
116         <checks>
117           <switch target="10.80.116.3" module="snmp">
118             <config inherit="SwitchPortX"/>
119               <community>SeKr3t</community>
120             </config>
121             <check uuid="1b4e28ba-2fa1-11d2-883f-e9b761bde3fb" name="1"/>
122             <check uuid="4deb0724-ccee-4360-83bc-255e7b9d989d" name="2"/>
123           </switch>
124         </checks>
125         <config_templates>
126           <config id="SwitchPortX">
127             <oid_description>IF-MIB::ifName.%[name]</oid_description>
128             <oid_alias>IF-MIB::ifAlias.%[name]</oid_alias>
129             <oid_speed>IF-MIB::ifSpeed.%[name]</oid_speed>
130             <oid_adminstatus>IF-MIB::ifAdminStatus.%[name]</oid_adminstatus>
131             <oid_operstatus>IF-MIB::ifOperStatus.%[name]</oid_operstatus>
132             <oid_inoctets>IF-MIB::ifHCInOctets.%[name]</oid_inoctets>
133             <oid_outoctets>IF-MIB::ifHCOutOctets.%[name]</oid_outoctets>
134             <oid_inerrors>IF-MIB::ifInErrors.%[name]</oid_inerrors>
135             <oid_outerrors>IF-MIB::ifOutErrors.%[name]</oid_outerrors>
136             <oid_indiscards>IF-MIB::ifInDiscards.%[name]</oid_indiscards>
137             <oid_outdiscards>IF-MIB::ifOutDiscards.%[name]</oid_outdiscards>
138             <oid_inucastpkts>IF-MIB::ifHCInUcastPkts.%[name]</oid_inucastpkts>
139             <oid_outucastpkts>IF-MIB::ifHCOutUcastPkts.%[name]</oid_outucastpkts>
140             <oid_inbcastpkts>IF-MIB::ifHCInBroadcastPkts.%[name]</oid_inbcastpkts>
141             <oid_outbcastpkts>IF-MIB::ifHCOutBroadcastPkts.%[name]</oid_outbcastpkts>
142           </config>
143         </config_templates>
144       </noit>
145     ]]></programlisting>
146     </example>
147   </examples>
148 </module>
Note: See TracBrowser for help on using the browser.