OpenNMS RAM RI Plugin
Introduction
A prototype plugin has been released implimenting the TMForum RAM Release 1.0 Simple Alarm Reporting interface as a service for the OpenNMS open source network management platform. This plugin was used in the Alarm Management for Converged Networks Catalyst . It has been delivered for evaluation to illustrate the features of RAM on a working system. However it is not yet considered production quality. The OpenNMS project welcomes user feedback as to the direction this implementation should take going forwards.
These notes concern release 1.0.2 of the plugin.
The code for the plugin can be obtained by subversion checkout from here; http://openoss.svn.sourceforge.net/svnroot/openoss/tip/sandbox/cgallen/experimental/ramcatalyst/tags/RELEASE_1_0_2
The plugin module can be obtained at OpenNMS_RAM_Plugin Version 1.0.2
Functionality
The interface is based upon the TMForum RAM Release 1.0 Simple Alarm Reporting profile which only supports the operations listed below. Attempting to access unsupported operations will result in an error response.
NotificationProducer: Subscribe | Allows a client to subscribe for RAM events from OpenNMS. The protocol used is WSNotification. The following events are supported: newAlarmNotification, clearedAlarmNotification |
PausableSubscriptionManager: Unsubscribe | Allows a client to unsubscribe for RAM events from OpenNMS. |
ResourceAlarmRetrievalService : getResourceAlarms | Allows a client to resynchronise by getting all active alarms. Alarm filtering is not supported. If more alarms are returned than can be supported in a single response, an Alarm Iterator reference is returned |
ResourceAlarmIterator: getNextResourceAlarmIteration | Allows a client to iterate through a long list of alarms |
ResourceAlarmIterator: releaseResourceAlarmIterator | Allows a client to release an alarm iterator if the results are no longer required |
Installation
The following prerequisit steps are required to get the Interface working;
- Install OpenNMS
- Install OpenNMS on a Windows or Linux platform using the normal procedures in the OpenNMS Installation Guide. The plugin has been tested with stable-1.10.8
- check your opennms installation is working correctly before going to the next step
- shut down opennms
- Download the RI.zip plugin from http://sourceforge.net/projects/openoss/upload/Experimental/OpenNMS_RAM_Plugin/Version_1_0_2/
- unzip the RI.zip contents into a folder <OpenNMS Home>/jetty-webapps/RI
(where <OpenNMS Home> is the location of your OpenNMS installation) - move the javaee-api-5.0-3.jar from <OpenNMS Home>/jetty-webapps/RI/WEB-INF/lib/javaee-api-5.0-3.jar to <OpenNMS Home>/lib
- remove the <OpenNMS Home>/lib/activation-1.1.jar
- append the following text to the <OpenNMS Home>/log4j.properties file. This will enable logging to tipRam.log. Please note that in Debug mode, this log fills up quickly.
# TM FORUM INTERFACE log4j.category.org.reflections.Reflections=DEBUG, RAM log4j.category.tipInterfaceTestLog=DEBUG, RAM log4j.category.tipTestNGTestLog=DEBUG, RAM log4j.additivity.OpenNMS.RAMProxy=false log4j.appender.RAM=org.apache.log4j.RollingFileAppender log4j.appender.RAM.MaxFileSize=100MB log4j.appender.RAM.MaxBackupIndex=4 log4j.appender.RAM.File=/opt/opennms/logs/webapp/tipRam.log # NOTE if windows use log4j.appender.RAM.File=C:/Program Files (x86)/OpenNMS/logs/webapp/tipRam.log log4j.appender.RAM.layout=org.apache.log4j.PatternLayout log4j.appender.RAM.layout.ConversionPattern=%d %-5p [%t] %c{1}: %m%n
Restart OpenNMS and navigate to http://<opennms server address>:8980/RI. You should see the following page;
- Navigate to http://<opennms server address>:8980/RI/services to see a list of WSDL services provided by the interface. (Please note that only the implemented services will return anything other than an error response)
Testing
The interface can be tested using the RAM CTK. For simple testing you can also use the following instructions
- Install the latest version of Firefox if you dont already have it installed
- Install the Firefox Poster Plugin. This is a developer tool for interacting with web services and other web resources that lets you make HTTP requests, set the entity body, and content type. This allows you to interact with web services and inspect the results.
- Select Tools>Poster to open the Poster dialog. Insert the following;
- URL = http://<OpenNMS Server Address>:8980/RI/services/ResourceAlarmRetrievalService
- Content Type =text/xml
- In the content panel insert the following code which is a getResourceAlarmsRequest message ;
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:getResourceAlarmsRequest xmlns="http://www.tmforum.org/xml/tip/internal/iterator" xmlns:ns2="http://www.tmforum.org/xml/tip/resource/trouble/alarm" xmlns:ns3="http://www.tmforum.org/xml/tip/internal/filter" xmlns:ns4="http://www.tmforum.org/xml/tip/internal/primitives" xmlns:ns5="http://www.tmforum.org/xml/tip/internal/entity" xmlns:ns6="http://www.tmforum.org/xml/tip/internal/extensibility" xmlns:ns7="http://www.tmforum.org/xml/tip/cbe/root/tip/fmk" xmlns:ns8="http://www.tmforum.org/xml/tip/cbe/problem" xmlns:ns9="http://www.tmforum.org/xml/tip/resource/res/tip/nrb" xmlns:ns10="http://www.tmforum.org/xml/tip/internal/exceptions" xmlns:ns11="http://www.tmforum.org/xml/tip/internal/notifications" xmlns:ns12="http://www.tmforum.org/xml/tip/common/notifications" xmlns:ns13="http://www.tmforum.org/xml/tip/cbe/job" xmlns:ns14="http://www.tmforum.org/xml/tip/cbe/base" xmlns:ns15="http://www.tmforum.org/xml/tip/cbe/time/sched" xmlns:ns16="http://www.tmforum.org/xml/tip/cbe/perf"> <maxElements>20</maxElements> </ns2:getResourceAlarmsRequest> </soap:Body> </soap:Envelope>
- Select POST. OpenNMS should return a formatted message with up to 20 current alarms from the alarm list and a reference to an iterator.
For more sophisticated tests you could use the CTK.