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="version" |
---|
17 |
required="optional" |
---|
18 |
default="2c" |
---|
19 |
allowed="(1|2c|3)">The SNMP version used for queries.</parameter> |
---|
20 |
<parameter name="oid_.+" |
---|
21 |
required="optional" |
---|
22 |
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> |
---|
23 |
<parameter name="type_.+" |
---|
24 |
required="optional" |
---|
25 |
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> |
---|
26 |
</checkconfig> |
---|
27 |
<examples> |
---|
28 |
<example> |
---|
29 |
<title>Simple snmp polling of two switchports</title> |
---|
30 |
<para>The following example configures SNMP checks against switchport 1 and 2 |
---|
31 |
on the switch with the IP address 10.80.116.3.</para> |
---|
32 |
<programlisting><![CDATA[ |
---|
33 |
<noit> |
---|
34 |
<modules> |
---|
35 |
<module image="snmp" name="snmp"/> |
---|
36 |
</modules> |
---|
37 |
<checks> |
---|
38 |
<switch target="10.80.116.3" module="snmp"> |
---|
39 |
<config> |
---|
40 |
<community>SeKr3t</community> |
---|
41 |
<oid_description>IF-MIB::ifName.%[name]</oid_description> |
---|
42 |
<oid_alias>IF-MIB::ifAlias.%[name]</oid_alias> |
---|
43 |
<oid_speed>IF-MIB::ifSpeed.%[name]</oid_speed> |
---|
44 |
<oid_adminstatus>IF-MIB::ifAdminStatus.%[name]</oid_adminstatus> |
---|
45 |
<oid_operstatus>IF-MIB::ifOperStatus.%[name]</oid_operstatus> |
---|
46 |
<oid_inoctets>IF-MIB::ifHCInOctets.%[name]</oid_inoctets> |
---|
47 |
<oid_outoctets>IF-MIB::ifHCOutOctets.%[name]</oid_outoctets> |
---|
48 |
<oid_inerrors>IF-MIB::ifInErrors.%[name]</oid_inerrors> |
---|
49 |
<oid_outerrors>IF-MIB::ifOutErrors.%[name]</oid_outerrors> |
---|
50 |
<oid_indiscards>IF-MIB::ifInDiscards.%[name]</oid_indiscards> |
---|
51 |
<oid_outdiscards>IF-MIB::ifOutDiscards.%[name]</oid_outdiscards> |
---|
52 |
<oid_inucastpkts>IF-MIB::ifHCInUcastPkts.%[name]</oid_inucastpkts> |
---|
53 |
<oid_outucastpkts>IF-MIB::ifHCOutUcastPkts.%[name]</oid_outucastpkts> |
---|
54 |
<oid_inbcastpkts>IF-MIB::ifHCInBroadcastPkts.%[name]</oid_inbcastpkts> |
---|
55 |
<oid_outbcastpkts>IF-MIB::ifHCOutBroadcastPkts.%[name]</oid_outbcastpkts> |
---|
56 |
</config> |
---|
57 |
<check uuid="1b4e28ba-2fa1-11d2-883f-e9b761bde3fb" name="1"/> |
---|
58 |
<check uuid="4deb0724-ccee-4360-83bc-255e7b9d989d" name="2"/> |
---|
59 |
</switch> |
---|
60 |
</checks> |
---|
61 |
</noit> |
---|
62 |
]]></programlisting> |
---|
63 |
</example> |
---|
64 |
<example> |
---|
65 |
<title>Example using config inheritance to show reuse</title> |
---|
66 |
<para>Accomplising the same goal, but by using reuse:</para> |
---|
67 |
|
---|
68 |
<programlisting><![CDATA[ |
---|
69 |
<noit> |
---|
70 |
<modules> |
---|
71 |
<module image="snmp" name="snmp"/> |
---|
72 |
</modules> |
---|
73 |
<checks> |
---|
74 |
<switch target="10.80.116.3" module="snmp"> |
---|
75 |
<config inherit="SwitchPortX"/> |
---|
76 |
<community>SeKr3t</community> |
---|
77 |
</config> |
---|
78 |
<check uuid="1b4e28ba-2fa1-11d2-883f-e9b761bde3fb" name="1"/> |
---|
79 |
<check uuid="4deb0724-ccee-4360-83bc-255e7b9d989d" name="2"/> |
---|
80 |
</switch> |
---|
81 |
</checks> |
---|
82 |
<config_templates> |
---|
83 |
<config id="SwitchPortX"> |
---|
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 |
</config_templates> |
---|
101 |
</noit> |
---|
102 |
]]></programlisting> |
---|
103 |
</example> |
---|
104 |
</examples> |
---|
105 |
</module> |
---|