root/docs/config/modules/snmp.xml

Revision 23dea7e00df87480acb58bb3398283c2bb227949, 7.0 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 3 years ago)

pull docs into master

  • Property mode set to 100644
Line 
1 <?xml version="1.0"?>
2 <section>
3   <title>snmp</title>
4   <para>The snmp module provides SNMP polling support for reconnoiter.</para>
5   <variablelist>
6     <varlistentry>
7       <term>loader</term>
8       <listitem>
9         <para>C</para>
10       </listitem>
11     </varlistentry>
12     <varlistentry>
13       <term>image</term>
14       <listitem>
15         <para>snmp.so</para>
16       </listitem>
17     </varlistentry>
18   </variablelist>
19   <section>
20     <title>Module Configuration</title>
21   </section>
22   <section>
23     <title>Check Configuration</title>
24     <variablelist>
25       <varlistentry>
26         <term>community</term>
27         <listitem>
28           <variablelist>
29             <varlistentry>
30               <term>required</term>
31               <listitem>
32                 <para>optional</para>
33               </listitem>
34             </varlistentry>
35             <varlistentry>
36               <term>default</term>
37               <listitem>
38                 <para>public</para>
39               </listitem>
40             </varlistentry>
41             <varlistentry>
42               <term>allowed</term>
43               <listitem>
44                 <para>.+</para>
45               </listitem>
46             </varlistentry>
47           </variablelist>
48           <para>The SNMP community string providing read access.</para>
49         </listitem>
50       </varlistentry>
51     </variablelist>
52     <variablelist>
53       <varlistentry>
54         <term>port</term>
55         <listitem>
56           <variablelist>
57             <varlistentry>
58               <term>required</term>
59               <listitem>
60                 <para>optional</para>
61               </listitem>
62             </varlistentry>
63             <varlistentry>
64               <term>default</term>
65               <listitem>
66                 <para>161</para>
67               </listitem>
68             </varlistentry>
69             <varlistentry>
70               <term>allowed</term>
71               <listitem>
72                 <para>\d+</para>
73               </listitem>
74             </varlistentry>
75           </variablelist>
76           <para>The UDP port to which SNMP queries will be sent.</para>
77         </listitem>
78       </varlistentry>
79     </variablelist>
80     <variablelist>
81       <varlistentry>
82         <term>oid_.+</term>
83         <listitem>
84           <variablelist>
85             <varlistentry>
86               <term>required</term>
87               <listitem>
88                 <para>optional</para>
89               </listitem>
90             </varlistentry>
91             <varlistentry>
92               <term>allowed</term>
93               <listitem>
94                 <para>.+</para>
95               </listitem>
96             </varlistentry>
97           </variablelist>
98           <para>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.</para>
99         </listitem>
100       </varlistentry>
101     </variablelist>
102   </section>
103   <example>
104     <title>Simple snmp polling of two switchports</title>
105     <para>The following example configures SNMP checks against switchport 1 and 2
106       on the switch with the IP address 10.80.116.3.</para>
107     <programlisting>
108       &lt;noit&gt;
109         &lt;modules&gt;
110           &lt;module image="snmp" name="snmp"/&gt;
111         &lt;/modules&gt;
112         &lt;checks&gt;
113           &lt;switch target="10.80.116.3" module="snmp"&gt;
114             &lt;config&gt;
115               &lt;community&gt;SeKr3t&lt;/community&gt;
116               &lt;oid_description&gt;IF-MIB::ifName.%[name]&lt;/oid_description&gt;
117               &lt;oid_alias&gt;IF-MIB::ifAlias.%[name]&lt;/oid_alias&gt;
118               &lt;oid_speed&gt;IF-MIB::ifSpeed.%[name]&lt;/oid_speed&gt;
119               &lt;oid_adminstatus&gt;IF-MIB::ifAdminStatus.%[name]&lt;/oid_adminstatus&gt;
120               &lt;oid_operstatus&gt;IF-MIB::ifOperStatus.%[name]&lt;/oid_operstatus&gt;
121               &lt;oid_inoctets&gt;IF-MIB::ifHCInOctets.%[name]&lt;/oid_inoctets&gt;
122               &lt;oid_outoctets&gt;IF-MIB::ifHCOutOctets.%[name]&lt;/oid_outoctets&gt;
123               &lt;oid_inerrors&gt;IF-MIB::ifInErrors.%[name]&lt;/oid_inerrors&gt;
124               &lt;oid_outerrors&gt;IF-MIB::ifOutErrors.%[name]&lt;/oid_outerrors&gt;
125               &lt;oid_indiscards&gt;IF-MIB::ifInDiscards.%[name]&lt;/oid_indiscards&gt;
126               &lt;oid_outdiscards&gt;IF-MIB::ifOutDiscards.%[name]&lt;/oid_outdiscards&gt;
127               &lt;oid_inucastpkts&gt;IF-MIB::ifHCInUcastPkts.%[name]&lt;/oid_inucastpkts&gt;
128               &lt;oid_outucastpkts&gt;IF-MIB::ifHCOutUcastPkts.%[name]&lt;/oid_outucastpkts&gt;
129               &lt;oid_inbcastpkts&gt;IF-MIB::ifHCInBroadcastPkts.%[name]&lt;/oid_inbcastpkts&gt;
130               &lt;oid_outbcastpkts&gt;IF-MIB::ifHCOutBroadcastPkts.%[name]&lt;/oid_outbcastpkts&gt;
131             &lt;/config&gt;
132             &lt;check uuid="1b4e28ba-2fa1-11d2-883f-e9b761bde3fb" name="1"/&gt;
133             &lt;check uuid="4deb0724-ccee-4360-83bc-255e7b9d989d" name="2"/&gt;
134           &lt;/switch&gt;
135         &lt;/checks&gt;
136       &lt;/noit&gt;
137     </programlisting>
138   </example>
139   <example>
140     <title>Example using config inheritance to show reuse</title>
141     <para>Accomplising the same goal, but by using reuse:</para>
142     <programlisting>
143       &lt;noit&gt;
144         &lt;modules&gt;
145           &lt;module image="snmp" name="snmp"/&gt;
146         &lt;/modules&gt;
147         &lt;checks&gt;
148           &lt;switch target="10.80.116.3" module="snmp"&gt;
149             &lt;config inherit="SwitchPortX"/&gt;
150               &lt;community&gt;SeKr3t&lt;/community&gt;
151             &lt;/config&gt;
152             &lt;check uuid="1b4e28ba-2fa1-11d2-883f-e9b761bde3fb" name="1"/&gt;
153             &lt;check uuid="4deb0724-ccee-4360-83bc-255e7b9d989d" name="2"/&gt;
154           &lt;/switch&gt;
155         &lt;/checks&gt;
156         &lt;config_templates&gt;
157           &lt;config id="SwitchPortX"&gt;
158             &lt;oid_description&gt;IF-MIB::ifName.%[name]&lt;/oid_description&gt;
159             &lt;oid_alias&gt;IF-MIB::ifAlias.%[name]&lt;/oid_alias&gt;
160             &lt;oid_speed&gt;IF-MIB::ifSpeed.%[name]&lt;/oid_speed&gt;
161             &lt;oid_adminstatus&gt;IF-MIB::ifAdminStatus.%[name]&lt;/oid_adminstatus&gt;
162             &lt;oid_operstatus&gt;IF-MIB::ifOperStatus.%[name]&lt;/oid_operstatus&gt;
163             &lt;oid_inoctets&gt;IF-MIB::ifHCInOctets.%[name]&lt;/oid_inoctets&gt;
164             &lt;oid_outoctets&gt;IF-MIB::ifHCOutOctets.%[name]&lt;/oid_outoctets&gt;
165             &lt;oid_inerrors&gt;IF-MIB::ifInErrors.%[name]&lt;/oid_inerrors&gt;
166             &lt;oid_outerrors&gt;IF-MIB::ifOutErrors.%[name]&lt;/oid_outerrors&gt;
167             &lt;oid_indiscards&gt;IF-MIB::ifInDiscards.%[name]&lt;/oid_indiscards&gt;
168             &lt;oid_outdiscards&gt;IF-MIB::ifOutDiscards.%[name]&lt;/oid_outdiscards&gt;
169             &lt;oid_inucastpkts&gt;IF-MIB::ifHCInUcastPkts.%[name]&lt;/oid_inucastpkts&gt;
170             &lt;oid_outucastpkts&gt;IF-MIB::ifHCOutUcastPkts.%[name]&lt;/oid_outucastpkts&gt;
171             &lt;oid_inbcastpkts&gt;IF-MIB::ifHCInBroadcastPkts.%[name]&lt;/oid_inbcastpkts&gt;
172             &lt;oid_outbcastpkts&gt;IF-MIB::ifHCOutBroadcastPkts.%[name]&lt;/oid_outbcastpkts&gt;
173           &lt;/config&gt;
174         &lt;/config_templates&gt;
175       &lt;/noit&gt;
176     </programlisting>
177   </example>
178 </section>
Note: See TracBrowser for help on using the browser.