The Simple Network Management Protocol (SNMP) is a lightweight protocol for monitoring devices on a network, for instance servers. The protocol distinguishes between administrative computer(s) who’s responsibility is the monitoring of other devices called agents. Communication between manager and agents is established by Program Data Units (PDU). An example of a PDU is a trap, an asynchronous notification from agent to manager.
The Oracle Service Bus (OSB) supports SNMP traps as part of the configuration of an alert destination, it’s enabled by default but nothing will happen if an alert is created in a message flow. In order to get the SNMP trap working, some configuration of the Weblogic Server (WLS) has to be done.
In the following paragraphs we explain how to configure WLS, define a proxy service to demonstrate the behavior and finally demonstrate the behaviour with help of an SNMP monitoring utility. Oh, don’t worry, this utility is already included in the WLS installation.
Click in the Domain Structure Panel on the SNMP node which is part of the Diagnostics Configuration. A summary of the SNMP Agents is shown.
Click in the first table called Domain-scoped SNMP agent table on the domain name base_domain. Ignore the text above this table concerning “Oracle recommends that you do not use this agent for new domains”. The general tab of the
base_domain is shown.
Check the Enabled checkbox, save, click on the tab Trap Destinations and create a new SNMP Trap Destination (button New).
Oracle recommends that you change the community to
weblogic. Also enter the hostname
localhost and UDP port
162 of the computer where the SNMP manager is listening. Save (and activate changes).
Oracle Service Bus
Define an Alert destination
Define an any XML proxy service with a message flow as shown below.
Publish the project.
Open a command window, change the directory to WL_ORACLE_HOME/server/bin, and run the following commands:
java weblogic.diagnostics.snmp.cmdline.Manager SnmpTrapMonitor -p 162
This Java program will show every received SNMP trap.
Open the OSB test console for the newly created proxy service and test with the following request
The command window shows the SNMP trap.
In our example, we used
localhost:162 as the address of the SNMP manager, in order to use SnmpTrapMonitor. In reality, this would be another address (or you could define additonal trap destinations as well). For more information about this subject, see the Oracle documentation. The next step would be configuring the SNMP management software but that is left as an exercise for the system engineer collegues. Speaking of decoupling…
2 thoughts on “Enabling SNMP traps in the Oracle Service Bus”
Its very nice..Can we enable the SNMP traps in BPEL by this way?It would be very helpful if i get a response.Thanks in advance.
Great topic! Did you know you can use OID’s (Object Identfiers) and MIB Â within WebLogic which contain predefined SNMP objects to monitor.
Comments are closed.