AnsweredAssumed Answered

Changing the Origin and Severity Level

Question asked by jeff041683 on Nov 20, 2013
Latest reply on Nov 21, 2013 by jeff041683

Changing the origin works using the script below

 

if event.source ~= nil then

  if event.message ~= nil then

    ifstring.find(event.message, "SpencerLab-Hub", 1, true) ~= nil then

       event.origin = "SpencerLab-Hub"

    end

  end

end

return event

 

When I add code to change the severity level the script breaks.  How do I fix it?

 

if event.source ~= nil then

  if event.message ~= nil then

   ifstring.find(event.message, "SpencerLab-Hub", 1, true) ~= nil then

      event.origin = "SpencerLab-Hub"

     a =alarm.get()

     update = {}

     update.nimid = a.nimid

     update.sid = a.sid

     update.level =NIML_CRITICAL

    alarm.set(update)

     end

  end

end

return event

Outcomes