SNMPPage edited by Lars HeinemannSNMP ComponentAvailable as of Camel 2.1 The snmp: component gives you the ability to poll SNMP capable devices or receiving traps. URI format
snmp://hostname[:port][?Options]
The component supports polling OID values from an SNMP enabled device and receiving traps.
The result of a pollGiven the situation, that I poll for the following OIDs: oids 1.3.6.1.2.1.1.3.0 1.3.6.1.2.1.25.3.2.1.5.1 1.3.6.1.2.1.25.3.5.1.1.1 1.3.6.1.2.1.43.5.1.1.11.1 The result will be the following: Result of toString conversion <?xml version="1.0" encoding="UTF-8"?> <snmp> <entry> <oid>1.3.6.1.2.1.1.3.0</oid> <value>6 days, 21:14:28.00</value> </entry> <entry> <oid>1.3.6.1.2.1.25.3.2.1.5.1</oid> <value>2</value> </entry> <entry> <oid>1.3.6.1.2.1.25.3.5.1.1.1</oid> <value>3</value> </entry> <entry> <oid>1.3.6.1.2.1.43.5.1.1.11.1</oid> <value>6</value> </entry> <entry> <oid>1.3.6.1.2.1.1.1.0</oid> <value>My Very Special Printer Of Brand Unknown</value> </entry> </snmp> As you maybe recognized there is one more result than requested....1.3.6.1.2.1.1.1.0. ExamplesPolling a remote device: snmp:192.168.178.23:161?protocol=udp&type=poll&oids=1.3.6.1.2.1.1.5.0 Setting up a trap receiver (Note that no OID info is needed here!): snmp:127.0.0.1:162?protocol=udp&type=trap Routing example in Java: (converts the SNMP PDU to XML String) from("snmp:192.168.178.23:161?protocol=udp&type=poll&oids=1.3.6.1.2.1.1.5.0"). convertBodyTo(String.class). to("activemq:snmp.states"); See Also
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
- [CONF] Apache Camel > SNMP confluence
