carl

Updating alarms with LUA

Discussion created by carl on Dec 13, 2013
Latest reply on Dec 13, 2013 by sd-servicemon

We had an old thread on this topic but it was becoming dated and thought it best to start a new one. For historical purpose here is the link to the old topic.

 

 

 

We have some mods on the board now who should have permissions to consolidate posts in this thread to this main post by editing it if they feel like doing so :smileyhappy:

 

Resources:

 

Basic Alarm manipulation using NAS LUA Scripts

Nas Whitepaper - attached to post

 

Updating Alarms with LUA

 

When the original thread was started in 2009 we did not have the UMP portal, USM or the NIS2 DB structure.Much remains the same but somethings have moved on.

 

Attached to this post is the NAS whitepaper which we will referance throughout this evolving post.

 

 

Changing Alarm Severity

 

Below is some sample code that can be used to change the severity of an alarm using pre-processing rules and the "script" action.

 

a = alarm.get()  new_alarm = {} new_alarm.nimid = a.nimid new_alarm.level = 4 new_alarm.severity = "major"  alarm.set(new_alarm)

 

Note: The level and severity must equate while level is an int and severity a string value, for example:

 

0 = clear

1 = information

2 = warning

3 = minor

4 = major

5 = critical

Attachments

Outcomes