Here is a variation of this alarm suppression script works great in our env due to the subsystems are setup. Doesn't use triggers or a preprocessing rule to make alarms invisble. It use 1 ao profile to run the script which then determines if the alarm should be set to invisible or not. The functions script contains a function to make a alarm invisible.
The way it works is a aoprofile for the probe you want to make alarm invisible for on arrival. Alarm is check for any other alarms with that ip in this case our connection sid is 4.4.3 so if net_connect couldn't ping it then no use display a snmpget alarm saying it couldn't talk to it as well could very well be used agains int traffic as well.
I have uploaded script as well since didn't no how it will display in formum.
require ("tpi-scripts/functions")
alist=alarm.get()
if alist ~= nil then
thisRobot = alist.robot
thisAlarm = alist.nimid
thisSource = alist.source
al = alarm.list("hostname",thisSource)
if al ~= nil then
for i=1,#al do
a=al
host,assto,sid,robot,almessage = a.hostname,a.assigned_to,a.sid,a.robot,a.message
printf ("their is a match moving to next step for ip %s - %s", a.sid,thisSource)
if sid == "4.4.3" then
printf ("their is a match setting to invisible - %s", thisSource)
visible (thisAlarm)
else
printf ("no major connection alarm associated or not correct sid")
end
end
else
print "no match"
end
end