keith_k

NAS script to change alarm severity

Discussion created by keith_k on Sep 29, 2011
Latest reply on Nov 20, 2016 by Garin

The script below changes the severity of an alarm. It is very short and simple, but it is useful because it takes the new severity as an argument. This means you can use the script in various AO profiles that need to set matching alarms to different severity levels.

 

In certain cases, it would be more useful to set the alarm severity in pre-processing rather than an AO profile. In that case, you need a script that has the severity hardcoded because pre-processing does not send an argument to the script.

 

-Keith

 

-------------------------------------------------------------------------------- -- change-severity -- -- Change the severity of an alarm. --------------------------------------------------------------------------------  -- Load new severity from argument or default to warning local new_level = SCRIPT_ARGUMENT or NIML_WARNING  local al = alarm.get()  local update = {}  update.nimid = al.nimid update.level = new_level update.prevlevel = al.level  alarm.set(update)

Outcomes