DX Infrastructure Management

Expand all | Collapse all

Change Alarm 'Origin' - Perl

  • 1.  Change Alarm 'Origin' - Perl

    Posted 11-27-2014 05:34 AM

    Is it possible to set the Alarm origin using ciAlarm or nimAlarm or similar?

     

    I'm trying ot avoid having to do all the PDS stuff just for one setting.

     

    Thanks.



  • 2.  Re: Change Alarm 'Origin' - Perl

    Posted 12-04-2014 11:12 AM

    No, as far as I know, none of the alarm related functions can set
    origin.

     

    So, you would actually need to grab the alarm PDS and create a new one.

     

    This is what alarm_enrichment does, which is why the final nimid you
    get, is not the same as the nimid the alarm has when it comes from the
    robot (which is a bit annoying).

     

    Could you use alarm_enrichment instead of making something custom?



  • 3.  Re: Change Alarm 'Origin' - Perl

    Posted 12-04-2014 01:00 PM
    Hello

    Another alternative suggestion that may help. I use a pre-processing rule that launches a LUA script. The script is pasted below: -

    event.origin = "NEWORIGIN"
    return event

    Pretty easy really ;-) Depends if you are happy to mange the pre-processing rules.

    Hope that helps
    Paul