FindAlarmByKeyRegex

FindAlarmByKeyRegex(key): Alarm

Find alarm by key using regular expression

Table 1. Parameters

key

String

Key regular expression

Return

First found Alarm object with key matching the regular expression (if several alarms match, which one is returned is not defined), or null if no alarm matches or the expression is invalid.

alarm = FindAlarmByKeyRegex("NODE_DOWN_.*"); //Will find alarm with regexp key "NODE_DOWN_.*"
println(alarm.key); //Will print key "NODE_DOWN_0x00001628"
println(alarm.message); //Will print alarm message, for example "Node down"