Thursday, July 21, 2011

Using Apache Camel to Monitor SNMP-enabled devices

I've been working with a hardware manufacturer company this week that wanted to use Apache Camel to get information about SNMP-enabled ( devices.

As you may know, Apache Camel has a SNMP component ( able to poll devices or receive SNMP traps.

Here is a very simple Camel route example that we used to get started with the camel-snmp component:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Configures the Camel Context-->
<beans xmlns="" xmlns:camel="" xmlns:xsi="" xsi:schemaLocation="">

  <camelContext xmlns="">
    <route id="SNMP-Sample-Route">
        <from uri="snmp:
        <log logName="SNMP_LOG" 
             message="&gt;&gt;&gt; ${body}"/>


So, the snmp-camel component has many configuration options but you basically have to provide the following:


Additionally, you have the following options:

On our example, we added the following (additionally to the hostname and port number of the host we wanted to get information from) to test the configuration:

protocol=UDP - You can either use UDP or TCP protocols

type=POLL - You can enter POLL or TRAP to define whether the camel component is going to poll the device for info and create a listener for SNMP trap events

delay=10 - Frequency you want to poll the device for information

oids= - In this particular example, we setup the OID which retrieves the amount of time the device is up (

The last piece of our Camel route was just a log component because we wanted to see what was coming back from the device. That's all!

We also used the FUSE IDE to rapidly test the scenario we wanted and that was pretty straightforward. The FUSE IDE can be downloaded from (

Don't forget to include camel-snmp as a dependency in your pom.xml file if you're using Maven which
should be like this:


Enjoy the ride!

Using SMS Channels with Oracle Intelligent Bots

Using SMS is a very convenient way to communicate with someone these days and most people prefer to use SMS instead of email. SMS also give...