JBI Support deprecated in Apache ServiceMix 4

JBI 1.0 support is available in Apache ServiceMix 4 to allow existing users to migrate more easily to this latest version - if you're a new user, you should consider JBI deprecated and not use it for your project. Take a look at our technology selection guidelines for more information.

servicemix-snmp

Overview

The ServiceMix SNMP component provides support for receiving SNMP events via the enterprise service bus by using the SNMP4J library.

Namespace and xbean.xml

The namespace URI for the servicemix-bean JBI component is http://servicemix.apache.org/snmp/1.0. This is an example of an xbean.xml file with a namespace definition with prefix bean.

<beans xmlns:snmp="http://servicemix.apache.org/snmp/1.0">

  <!-- add snmp:poller or snmp:sender definitions here -->

</beans>

Endpoint types

The servicemix-snmp component defines two endpoint types:

  • snmp:poller :: Periodically polls a device status using SNMP and sends the OIDs as a JBI MessageExchange

  • snmp:trap-consumer :: Consumes an SNMP trap message and sends the OIDs as a JBI MessageExchange

snmp:poller

Endpoint properties

Property Name Type Description
address java.lang.String <p>Specifies the connection URI used to connect to a snmp capable device. <br /><br /> <b><u>Template:</u></b> <br />  nbsp; i><rotocol><ost><ort>/i> <br /><br /> <b><u>Details:</u></b><br /><br/> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="40%" align="left"><b><u>Name</u></b></td> <td width="60%" align="left"><b><u>Description</u></b></td> </tr> <tr> <td>protocol</td> <td>the protocol to use (udp or tcp)</td> </tr> <tr> <td>host</td> <td>the name or ip address of the snmp capable device</td> </tr> <tr> <td>port</td> <td>the port number to use</td> </tr> </table> <br/> <b><u>Example:</u></b><br />  nbsp; i>udp:192.168.2.122/161</i></p> <i> nbsp; he default value is <b>null</b></i><br/><br/>
concurrentPolling boolean <p> Sets whether more than one poll can be active at a time (true means yes). Default value is <code>false</code>. </p>
delay long <p> Sets the amount of time in milliseconds that the endpoint should wait before making the first poll. </p>
endpoint java.lang.String <p> Get the endpoint implementation. </p>
firstTime java.util.Date <p> Sets the date on which the first poll will be executed. If a delay is also set using <code>setDelay</code>, the delay interval will be added after the date specified. </p>
interfaceName javax.xml.namespace.QName <p> Get the qualified name of the endpoint interface. </p>
marshaler org.apache.servicemix.snmp.marshaler.SnmpMarshalerSupport <p>Specifies a marshaler class which provides the logic for converting a snmp response into a normalized message. This class has to implement the <code>SnmpMarshalerSupport</code> interface. If you don't specify a marshaler, the <code>DefaultSnmpMarshaler</code> will be used.</p>
oids (java.lang.Object)\* <p>Specifies a reference to a list of OID values which will be used for the snmp request. You have two possibilities how to specify the value: <br /><br />  i>a) referencing to a file containing a list of OID values separated by a line feed <br/> nbsp; nbsp;or<br/>  i>b) defining a coma (<b>,</b>) separated list of OID values <br /><br /> <b><u>Examples:</u></b><br />  nbsp; i>a) oids="classpath:myOids.txt"<br />  nbsp; nbsp; nbsp; ids="file:/home/lhein/snmp/device_a/oids.txt"<br/> <br />  nbsp; i>b) 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"</i></p> <i> nbsp; he default value is <b>null</b></i><br/><br/>
period long <p> Sets the number of milliseconds between polling attempts. </p>
retries int <p>Specifies the connection retries.</p> <i> nbsp; he default value is <b>2</b></i><br/><br/>
scheduler org.apache.servicemix.common.scheduler.Scheduler <p> Sets a custom scheduler implementation if you need more fine-grained control over the polling schedule. </p>
service javax.xml.namespace.QName <p> Get the service qualified name of the endpoint. </p>
snmpCommunity java.lang.String <p>Specifies the snmp community to use.</p> <i> nbsp; he default value is <b>"public"</b></i><br/><br/>
snmpVersion int <p>Specifies the snmp protocol version to use.</p> <i> nbsp; he default value is <b>0 (version 1)</b></i><br/><br/>
targetEndpoint java.lang.String the name of the endpoint to which requests are sent
targetInterface javax.xml.namespace.QName the QName of the interface to which requests are sent
targetOperation javax.xml.namespace.QName the QName of the operation to which requests are sent
targetService javax.xml.namespace.QName the QName of the service to which requests are sent
targetUri java.lang.String <p> Gets the target URI of the consumer endpoint. </p>
timeout int <p>Specifies the connection time out in milliseconds.</p> <i> nbsp; he default value is <b>1500</b></i><br/><br/>

vfs:trap-consumer

Endpoint properties