DX NetOps

 View Only
  • 1.  Spectrum - passing alarm title via custom context menu item

    Posted Oct 22, 2020 05:15 AM
    Good morning,

    We're in the process of developing a script that is called from a custom menu item.  This is available from alarm contexts only.  We wish to pass a number of arguments, including the alarm title, to the script.  A simplified example:

    <launch-web-server-script>
      <command>D:/Program Files/Python39/python.exe D:/scripts/myScript.py {0}</command>
      <param>
        <attribute>AlarmAttrID.CAUSE_TITLE</attribute>
      </param>
    </launch-web-server-script>

    The alarm title that is being passed isn't always the title being displayed in OneClick.  Specifically, if we have some event rules that pass text into field 76620, this is not being used.

    Is there a technique we can use to pass the dynamic alarm title to the script, or is there a way we could obtain the dynamic alarm title in the backend script (perhaps via a REST API?)

    Regards,
    Neville

    ------------------------------
    Solution Designer
    KCOM Group Limited
    ------------------------------


  • 2.  RE: Spectrum - passing alarm title via custom context menu item
    Best Answer

    Broadcom Employee
    Posted Oct 23, 2020 10:07 AM
    Neville,
    What version of Spectrum?  Current versions of Spectrum should now always have ALARM_TITLE( 0x12b4c hex , 76620 dec ) set, and should match whatever is displayed in OneClick.  This changed recently to support the enhancements to make dynamic alarm titles easier to implement using varbinds in pcause title.

    -Todd


  • 3.  RE: Spectrum - passing alarm title via custom context menu item

    Posted Oct 23, 2020 10:51 AM
    Thanks Todd, that's great.  I was using AlarmAttrID.CAUSE_TITLE as it was in a guide, I assumed this was the same as attribute 0x12b4c.

    Thanks again,
    Neville


    ------------------------------
    Solution Designer
    KCOM Group Limited
    ------------------------------



  • 4.  RE: Spectrum - passing alarm title via custom context menu item

    Broadcom Employee
    Posted Oct 23, 2020 11:20 AM
    You should be able to use AlarmAttrID.ALARM_TITLE.  This used to be only set for Alarms with dynamic alarm titles, but now is always set to make it easier to consume.