Enabling SNMP traps in the Oracle Service Bus
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…
- Hands-on: Run-time datasource selection with JCA adapters in the Oracle Service Bus 11g
- Enabling Role-based security management in Oracle Designer 6i/9i/10g through the Repository Object Browser
- Invoking HTTP Services from Oracle BPEL PM – SOA enabling PHP, Servlets, RSS,…
- OOW 2009: Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
- Oracle 11g SOA Suite â€“ Service-enable a Query Using the Database Adapterâ€™s Execute Pure SQL Option