DX NetOps

 View Only
  • 1.  Dynamic Alarm Title for Netscaler LiveHealth service

    Posted Jan 28, 2016 03:17 PM

    Hi, I'm looking for a Specific Dynamic Alarm Title for a type of event.

    I have this one:

    0x1120e E 50 A 3,0x1120a,10 P "CreateEventWithVariables({C CURRENT_MODEL},{H 0xfff0124a},SetEventVariable( GetEventVariableList(),{H 0x12b4c}, Append( ToString(GetEventVariable({S 7})))))"

     

    I have a LiveHealth trap monitoring a event on Netscaler Load Balancing, when a BackEnd is down, the event is showed on OC Spectrum with the default title: Live Health...

    I need put the variable "S 7" [Name of the Profile] in the title.

     

    When I try to update the event configuration, the Spectrum CP show this error:

     

    Error: parse failed: syntax error. Parsing failed at position 200, the unparsed remainder is "".

    Error: parse failed: Procedure parsing failure

    Procedure did not parse successfully (error reason: Procedure parsing failure) for event 0x1120e on line 150 of event disposition file ../custom/Events/EventDisp

        0x1120e E 50 A 3,0x1120a,10 P "CreateEventWithVariables({C CURRENT_MODEL},{H 0xfff0124a},SetEventVariable( GetEventVariableList(),{H 0x12b4c}, Append({S\"Monitor Netscaler Alertado:\"}, Append(ToString(GetEventVariable ({ S 7 }))))))"

     

    Someone can help me please.



  • 2.  Re: Dynamic Alarm Title for Netscaler LiveHealth service
    Best Answer

    Posted Jan 29, 2016 04:03 AM

    It is wrong:

    Append(ToString(GetEventVariable ({ S 7 })))

     

    Append needs to parameters and is here not necessary.

    {S 7} is also wrong, it is not a string but an unsigned integer.

     

    Replace it with:

    ToString(GetEventVariable ({ U 7 }))



  • 3.  Re: Dynamic Alarm Title for Netscaler LiveHealth service

    Posted Feb 04, 2016 11:42 PM

    Hi,

     

    First of all it need to be separated into 2 events : one with event procedure and the second one is the event that will be created by the event procedure. This second event will raise the alarm.

     

    Also Append will take 2 parameters, so as baldy mentioned above, we need only one Append with 2 parameters, one the static string and the second from variable 7.

     

    Also instead of S, we need to mention U. and if it is not string we need to use ToString as you have used.

     

     

     

     

     

    Please use below event disp script and replace 0xZZZZZ (at 2 places) with the event code that you want to use or 0xfff0124a which you intended for event code.

     

     

    *****************************************************************************************

     

     

    0x1120e P "CreateEventWithVariables(\

                                                  {C CURRENT_MODEL},\

                                                  {H 0xZZZZZ},\

                                                  SetEventVariable( GetEventVariableList(), {H 0x12b4c},\

                                                                    Append( {S\"Monitor Netscaler Alertado: \"},\

                                                                                  ToString(GetEventVariable({U 7}))\

                                                                                )\

                                                                  )\

                                                )"

     

     

     

     

    0xZZZZZ E 50 A 3, 0x1120a, 10

     

    *****************************************************************************************