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: SubscribeAllows a client to subscribe for RAM events from OpenNMS. The protocol used is WSNotification. The following events are supported:
newAlarmNotification, clearedAlarmNotification
PausableSubscriptionManager: UnsubscribeAllows a client to unsubscribe for RAM events from OpenNMS.
ResourceAlarmRetrievalService : getResourceAlarmsAllows 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: getNextResourceAlarmIterationAllows a client to iterate through a long list of alarms
ResourceAlarmIterator: releaseResourceAlarmIteratorAllows 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;

  1. Install OpenNMS
    1. 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
    2. check your opennms installation is working correctly before going to the next step
    3. shut down opennms
  2. Download the RI.zip plugin from  http://sourceforge.net/projects/openoss/upload/Experimental/OpenNMS_RAM_Plugin/Version_1_0_2/
  3. unzip the RI.zip contents into a folder <OpenNMS Home>/jetty-webapps/RI
    (where <OpenNMS Home> is the location of your OpenNMS installation)
  4. 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
  5. remove the <OpenNMS Home>/lib/activation-1.1.jar
  6. 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
  7. Restart OpenNMS and navigate to http://<opennms server address>:8980/RI. You should see the following page;

  8. 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

  1. Install the latest version of Firefox if you dont already have it installed
  2. 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.
  3. 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>



  4. 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.

 

Â