root/src/modules/snmp.xml

Revision 0500158dc42e74f1ff76353fc2ff80cdb4ee5eb5, 4.6 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 4 years ago)

fixes #209

  • 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   <checkconfig>
8     <parameter name="community"
9                required="optional"
10                default="public"
11                allowed=".+">The SNMP community string providing read access.</parameter>
12     <parameter name="port"
13                required="optional"
14                default="161"
15                allowed="\d+">The UDP port to which SNMP queries will be sent.</parameter>
16     <parameter name="oid_.+"
17                required="optional"
18                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>
19   </checkconfig>
20   <examples>
21     <example>
22       <title>Simple snmp polling of two switchports</title>
23       <para>The following example configures SNMP checks against switchport 1 and 2
24       on the switch with the IP address 10.80.116.3.</para>
25       <programlisting><![CDATA[
26       <noit>
27         <modules>
28           <module image="snmp" name="snmp"/>
29         </modules>
30         <checks>
31           <switch target="10.80.116.3" module="snmp">
32             <config>
33               <community>SeKr3t</community>
34               <oid_description>IF-MIB::ifName.%[name]</oid_description>
35               <oid_alias>IF-MIB::ifAlias.%[name]</oid_alias>
36               <oid_speed>IF-MIB::ifSpeed.%[name]</oid_speed>
37               <oid_adminstatus>IF-MIB::ifAdminStatus.%[name]</oid_adminstatus>
38               <oid_operstatus>IF-MIB::ifOperStatus.%[name]</oid_operstatus>
39               <oid_inoctets>IF-MIB::ifHCInOctets.%[name]</oid_inoctets>
40               <oid_outoctets>IF-MIB::ifHCOutOctets.%[name]</oid_outoctets>
41               <oid_inerrors>IF-MIB::ifInErrors.%[name]</oid_inerrors>
42               <oid_outerrors>IF-MIB::ifOutErrors.%[name]</oid_outerrors>
43               <oid_indiscards>IF-MIB::ifInDiscards.%[name]</oid_indiscards>
44               <oid_outdiscards>IF-MIB::ifOutDiscards.%[name]</oid_outdiscards>
45               <oid_inucastpkts>IF-MIB::ifHCInUcastPkts.%[name]</oid_inucastpkts>
46               <oid_outucastpkts>IF-MIB::ifHCOutUcastPkts.%[name]</oid_outucastpkts>
47               <oid_inbcastpkts>IF-MIB::ifHCInBroadcastPkts.%[name]</oid_inbcastpkts>
48               <oid_outbcastpkts>IF-MIB::ifHCOutBroadcastPkts.%[name]</oid_outbcastpkts>
49             </config>
50             <check uuid="1b4e28ba-2fa1-11d2-883f-e9b761bde3fb" name="1"/>
51             <check uuid="4deb0724-ccee-4360-83bc-255e7b9d989d" name="2"/>
52           </switch>
53         </checks>
54       </noit>
55     ]]></programlisting>
56     </example>
57     <example>
58       <title>Example using config inheritance to show reuse</title>
59       <para>Accomplising the same goal, but by using reuse:</para>
60
61       <programlisting><![CDATA[
62       <noit>
63         <modules>
64           <module image="snmp" name="snmp"/>
65         </modules>
66         <checks>
67           <switch target="10.80.116.3" module="snmp">
68             <config inherit="SwitchPortX"/>
69               <community>SeKr3t</community>
70             </config>
71             <check uuid="1b4e28ba-2fa1-11d2-883f-e9b761bde3fb" name="1"/>
72             <check uuid="4deb0724-ccee-4360-83bc-255e7b9d989d" name="2"/>
73           </switch>
74         </checks>
75         <config_templates>
76           <config id="SwitchPortX">
77             <oid_description>IF-MIB::ifName.%[name]</oid_description>
78             <oid_alias>IF-MIB::ifAlias.%[name]</oid_alias>
79             <oid_speed>IF-MIB::ifSpeed.%[name]</oid_speed>
80             <oid_adminstatus>IF-MIB::ifAdminStatus.%[name]</oid_adminstatus>
81             <oid_operstatus>IF-MIB::ifOperStatus.%[name]</oid_operstatus>
82             <oid_inoctets>IF-MIB::ifHCInOctets.%[name]</oid_inoctets>
83             <oid_outoctets>IF-MIB::ifHCOutOctets.%[name]</oid_outoctets>
84             <oid_inerrors>IF-MIB::ifInErrors.%[name]</oid_inerrors>
85             <oid_outerrors>IF-MIB::ifOutErrors.%[name]</oid_outerrors>
86             <oid_indiscards>IF-MIB::ifInDiscards.%[name]</oid_indiscards>
87             <oid_outdiscards>IF-MIB::ifOutDiscards.%[name]</oid_outdiscards>
88             <oid_inucastpkts>IF-MIB::ifHCInUcastPkts.%[name]</oid_inucastpkts>
89             <oid_outucastpkts>IF-MIB::ifHCOutUcastPkts.%[name]</oid_outucastpkts>
90             <oid_inbcastpkts>IF-MIB::ifHCInBroadcastPkts.%[name]</oid_inbcastpkts>
91             <oid_outbcastpkts>IF-MIB::ifHCOutBroadcastPkts.%[name]</oid_outbcastpkts>
92           </config>
93         </config_templates>
94       </noit>
95     ]]></programlisting>
96     </example>
97   </examples>
98 </module>
Note: See TracBrowser for help on using the browser.