NMS Type MP-Temporary Alarm Handling
From GEANT2-JRA1 Wiki
What is this shortcut?
For Alcatel NMS, PerfSONAR has developed a java package which temporarily acts as a shortcut to update an alarm database. This alarm database is made available as a PerfSONAR Measurement Archive.
Why do we need this shortcut?
Alarms will be handled by the NMS Type Measurement Point Service in the future. Measurement Point services will be able to 'Push' an alarm whenever it has been raised. While the design intricacies are being worked upon by the PerfSONAR development group, a shortcut approach mainly to meet the approaching deadlines has been devised.
More about the Java package
The Java package (v 0.3) consists of four java files (three of these provide utilities such as logging, configuration and database connection). The main file (SDHStatusUpdate.java) takes an input containing two fields. The first field needs to know whether the given alarm is for a Path, Trail or a Trunk. (Some vocabulary can be found here). The second field is a set of 4 comma separated values in the order Id,Time,Status,Alarm_Id (where Id can either be Path_Id or Trunk_Id or Trail_Id)
Some amount of processing/correlation is done on the path alarms - basically to take care of duplicates. However the correlation is currently only done for Path alarms and not Trunk or Trail. The package can also be used without any such processing for any of the alarm types.
If the alarm_Id is provided the input for a path alarm, the package treats this as a signal to do some processing. Otherwise, it simply updates the database with the given Id and status. The processing involves checking the database to read the current status and then updating it if there are no duplicate alarms. To a certain extent, the program is capable of handling missed alarms (alarms can be missed mainly because of the underlying system or the NMS). But most of the cases where alarms are missed require human intervention. The java program currently logs such information to the configured log file.
How can other NRENs/Organisations use this program?
The java program requires the usage of a MySQL database with a specific table structure. A shell script is currently needed which can listen to ports where alarms are first sent to (for example SNMP Traps). The shell script should do the basic filtering based on NREN/Organisation alarm storage policies (whether the NREN/Organization want to store all the alarms or a subset of the alarms, etc). The shell script is also required to do some basic formatting of alarm structures. (See technical details section below). The program has many configuration possibilities such as specifying Database URL, log file location, Timezone in which time information is supplied, etc. These configuration possibilities allow its re-use by other interested NRENs/Organisations.
Technical Details
Alarms as command line parameters to be given in the format: Alarm_type Path_Id,Time,Status,Alarm_Id
Alarm example: Path GEN-MIL,1029898923,down,1234 (Time has to be specified in yyyymmddhhmmss format. However, on the database, it is stored in unix time format - number of seconds since epoch)
Database requirement: MySQL database with the database schema given below (soon)
Configurations via flat files: implemented in v0.3 sample config file
Sources
Version 0.3 available as a jar file for download (contains sources)
Required supporting jars
- mysql-connector-java-5.0.0-beta-bin.jar
- log4j-1.2.8.jar
