DX Unified Infrastructure Management

  • 1.  custom fields in NAS alarms

    Posted Aug 09, 2010 06:58 PM

    I have a customer who wants to populate the fields custom1, custom2, custom3 etc in his alarm fields through a pre-processing rule.  This rule would look at a static text file, match the hostname from the alarm with the hostname in the text file, and populate the custom alarm fields.  This could then be looked at by the NOC operators who have selected the custom1,2,3 etc as their default views and allow them to manage our alarms easier.

     

    I'm looking for any help here but I've attached a screenshot with an explanation to supplement this post.

     

    Thanks



  • 2.  Re: custom fields in NAS alarms



  • 3.  Re: custom fields in NAS alarms

    Posted Aug 10, 2010 07:09 PM

    You can use something like this  in a pre-processing script....

     

     -- replace with file name. Note: this is a comma separated list. Each line needs to have the same number of values

    fname = "C:/computers.txt"io.input(fname)
    for line in io.lines() do
       print(line)
       tmp = split(line,"/,")
       if tmp[1] == event.hostname then
          print("Found record for: " .. event.hostname)

          event.custom_1 = tmp[2]

          event.custom_2 = tmp[3]

          event.custom_3 = tmp[4]
          event.custom_4 = tmp[5]
       end
    end
    return event