DX NetOps

Expand all | Collapse all

Technical Tip: Need to store value of additional attribute instance from threshold SpectroWatch attribute instance

  • 1.  Technical Tip: Need to store value of additional attribute instance from threshold SpectroWatch attribute instance

    Posted Jul 29, 2014 09:29 AM

    Technical Tip: Need to store value of additional attribute instance from threshold SpectroWatch attribute instance

     

    CA Spectrum Technical Tip by Joe Ackley, Principal Support Engineer

     

     

    Description:

     

    I have created a SpectroWatch on an instance attribute where the attribute used in the watch expression is in the “attribute_id1.#” format to watch all instances or a range of instances. The watch has a threshold configured to log an event when the threshold is violated. In the resulting event, I need to include the same instance value of “attribute_id2” as the instance value of “attribute_id1” in the watch expression that triggered the threshold.

     

    Solution:

     

    When a threshold SpectroWatch is violated, there are a number of Event Variables that are passed to the resulting event. Event Variable number 8 is the instance value of the attribute in the watch expression that violated the threshold. This value can be used in an Event Procedure to store the same instance value of another attribute to a new Event Variable.

     

    In the following example, event 0xfff00000 is generated when the threshold is violated from a SpectroWatch. The procedures takes the value of Event Variable “8” ( { U 8 } ) passed to it from the SpectroWatch and uses it to store the value of attribute 0x3d00a5 of the same instance to Event Variable “20” ( { U 20 } ) for event 0xfff00001.

     

    0xfff00000 E 50 P " \

      CreateEventWithAttributes( \

        { C CURRENT_MODEL }, \

        { H 0xfff00001 }, \

        SetEventAttribute( \

          GetEventAttributeList(), \

          { U 20 }, \

          ReadAttributeInstance( \

            { C CURRENT_MODEL }, \

            { H 0x3d00a5 }, \

            GetEventAttribute( { U 8 } ))))"

     

    0xfff00001 E 50 A 3,0xfff00001



  • 2.  Re: Technical Tip: Need to store value of additional attribute instance from threshold SpectroWatch attribute instance

    Posted Jun 22, 2015 04:28 PM

    Hey Joe!!

     

    Would it be possible to utilize this same Procedure to add multiple attribute values to the final output event?

     

    I need to call 4 additional  attributes to the output event in addition to the Watch Event Variable 8.

     

    Possible in a single Procedure?

     

    Thanks!!



  • 3.  Re: Technical Tip: Need to store value of additional attribute instance from threshold SpectroWatch attribute instance

    Posted Jun 23, 2015 12:24 PM

    Nice - thanks for sharing