DX Unified Infrastructure Management

  • 1.  Is there a Lua method to exclude an alarm?

    Posted Nov 20, 2010 12:22 AM

    I have 133 different locations that we monitor. Some servers are monitored by robots at each location, while other devices/servers are monitored remotely. 

     

    What I'd like to do is exclude all alarms from the same location when it is caused by a network outage, instead sending one alarm and preventing AO's from triggering when arriving in the nas.  What I'd like to do is setup a Pre-processing filter that can exclude alarms if they are coming from a location with a network issue via a custom lua script.

     

    Is this possible?



  • 2.  Re: Is there a Lua method to exclude an alarm?

    Posted Nov 20, 2010 07:47 AM

    I think this is possible if you use triggers to determine wether a site has a network issue. When using custom pre-processing rules, most of the NAS-specific Lua extensions are not available. The trigger "library" is not available either, but you can access the trigger.state() function as state() in a pre-processing script.

     

    I think you can also use getvariable() in pre-processing script, so that might be another option to check if a site is being considered down.

     

    If you are okay waiting until the alarm is created before checking if it should be disregarded because of a site down, you have access to all of the Lua functionality when using AO profiles.

     

    -Keith



  • 3.  Re: Is there a Lua method to exclude an alarm?
    Best Answer

    Posted Nov 21, 2010 05:38 AM

    I have written a lua script that will exclude alarms based on if the host has a net connect alarm, it excludes all the other probes like snmpget,int_traff,cisco monitor.  I am sure something like this could be done essentially based off the orgin.  In my case I make them invisible but excluding would be a return nil instead of turning invisible.  Here is a piece of the script that should get you started it's based off a ao profile. My net_connect alarm that comes in has a sid of 3.1.1..

     

    require ("msn/global")
    alist=alarm.get()
    probe = alist.prid
    if alist ~= nil then
       thisRobot = alist.robot
       thisAlarm = alist.nimid
       thisSource = alist.source
       thisMsg = alist.message
       al = alarm.list("hostname",thisSource)
       if probe == "snmpget" then
          if al ~= nil then
             for i=1,#al do
                a=al[i]
                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 == "3.1.1" then
                   printf ("snmpget match setting to invisible exiting - %s", thisSource)
                   visible (thisAlarm)
                   exit()
                else
                   printf ("snmpget - no critical net_connect alarm %s or not correct sid", thisSource)
                   --mkvisible (thisAlarm)
                end
             end
          end   
       elseif probe == "cisco_monitor" then



  • 4.  Re: Is there a Lua method to exclude an alarm?

    Posted Nov 22, 2010 07:24 PM

    Thanks Keith and Neal, sound advice. 



  • 5.  Re: Is there a Lua method to exclude an alarm?

    Posted Nov 22, 2010 07:32 PM

    Hi Scott,

    Let me know if you need any specific assistance with this.



  • 6.  Re: Is there a Lua method to exclude an alarm?

    Posted Nov 22, 2010 07:41 PM

    Just to make sure this is clear... Neal's method would be executed from a NAS profile and not a pre-processing rule. As Keith noted, to use a LUA script executed from a  pre-processing rule, then you would probably have to use triggers that captured the alarms whioch would indicate a network outage. Also, there can be a negative effect on alarm throughput if the pre-processing is too generalized. I have, in the past, used a combination of pre-processing rules, triggers, and an profile executed script to accomplish this. The pre-processing rule set the incoming alarm to invisible (note that all AO profiles were set to process only visible alarms with the exception of the one(s) needed to execute the LUA script). Triggers captured matching network outage related alarms. the LUA script processed through the trigger alarms to determine if the incoming invisible alarm should be set to visible or if it needed to be closed and a new alarm created as a probable root cause.



  • 7.  Re: Is there a Lua method to exclude an alarm?

    Posted Nov 22, 2010 08:37 PM
    I was also concerned about the impact of having a pre-processor filter that would slow imcoming messages. I've decided to use a combination of subsystem id's for location: stores, warehouse, main office, DR, etc. with trigger for each location. a lua script would be called from an AO that would make any alarm from the same location invisible. The email notification AO would only apply to visible alarms ( currently set to ignore visibility ) and would have a lower priority than the lua script OA. I think this sould accomplish what I'm trying to do.
    That's for all the feedback.