Suppress alarm from fetchmsg probe when there are multiple alarms


Article ID: 102733


Updated On:


DX Infrastructure Management NIMSOFT PROBES


How do we suppress the lower severity alarm when a higher severity alarm is present?

<Please see attached file for image>

UIM fetchmsg probe


UIM 8.51


One option would be to edit the setup of the custom messages and remove the ‘$profile’ item from the message generated and change the suppression key to $host/$key.

A second option using a "nas" Auto Operator Profile and script.

1- Create a script with these contents
 -- Gets the ao-filtered alarm, this is passed by our profile
-- script provided as a sample and is not supported

a = alarm.get()
--get a sub string from the critical alarm - starting at position 0 to 26
messageSearchStr=(string.sub(a.message, 0,26))
-- set string for hostname from critical alarm hostname
criticalHost = a.hostname
--get a list of alarms and iterate through them
--alarm.list takes arguments as well, for key and value

if al ~= nil then
   for i=1,#al do
      sevStr = "major"
      -- set string for major alarm hostname
      majorHost = al[i].hostname
      if (string.match(al[i].message , messageSearchStr) and string.match(al[i].severity, sevStr) and (majorHost == criticalHost)  ) then
            print("Hostname "[i].hostname)
            --create alarm to modify major alarm attributes
            e = {}
            e.nimid = al[i].nimid
            e.level = NIML_CLEAR                
            e.visible = 0
            alarm.set (e)

2- Create an Auto Operator profile.
      Action type:   script
      Action mode: On Message arrival
      Script: name of script created in step #1
      Probe: fetchmsg

<Please see attached file for image>

Auto Operator Profile

Additional Information

alarm.list ( [Field, Value [, Value…]] )
Returns an array of table elements containing alarm data. Will, if used with the field and value(s) parameters, filter the result set according to the user criteria. Use the column name for your field and one or more match strings. The % is used as the wildcard character. E.g alarm.list (“hostname”,”%xp%”) returns alarms for all hostnames with ’xp’ in them. These records are extracted from the NAS_ALARMS table.

*** Support cannot assist in writing and debugging LUA scripts ***


1558699884146000102733_sktwi1f5rjvs16jwn.jpeg get_app
1558699882335000102733_sktwi1f5rjvs16jwm.jpeg get_app