rkalidh87

changing severity of Robot inactive alarms.

Discussion created by rkalidh87 on Feb 27, 2018
Latest reply on Jul 13, 2018 by Greenones

Hi,

 

Am trying to change severity of Robot Inactive alarms, when the alarm arrives, it will ping host name and if it success, am changing the severity and message, below is the code,

 

alerts= alarm.list("Message","%inactive%")
if alerts ~= nil then
for i=1,#alerts do
a=alerts[i]
--print(a.hostname)
--print(a.severity)
if (action.ping(a.hostname)) then
--print("Success")
message_add_OK = "server responds to ping OK"
update = {}
update.nimid = a.nimid
update.message=a.message.." "..message_add_OK
update.level = NIML_MAJOR
alarm.set(update)
else
-- print("Failure")
end
end
end

 

challenge here is if i create AO profile with script, alarm arrives in NAS and severity changed with message, but whenever there is increase in message counter, it is reverting back to original value(critical) and then changes to major.

 

If i place in Pre-processing rules, alarm itself is not showing in NAS, and if remove it from pre-processing alarms coming to NAS.

 

please help to achieve this,

Outcomes