Service Operations Insight

 View Only
  • 1.  How to parse variable in Event Policy SOI 4.0

    Posted Sep 05, 2016 11:58 PM

    Hi Guys,

     

    I have requirement to parse variable in Event Policy SOI 4.0. I want to take initial word and that's mysql.

     

    I have tried to set the assigned value as ${pattern1.Message[0]} but there's no result in tab preview.

     

    Expected value is

    mysql

     

    How does one do that?

     

    Best Regards,

    Okik



  • 2.  Re: How to parse variable in Event Policy SOI 4.0

    Posted Sep 06, 2016 03:11 AM

    Hi Okik,

    you can use the Parse function (fn:Parse) to achieve this.

     

    Example: Summary = ${pattern1.Summary} = "This server has a major problem."

    I want to extract the severity into UserAttribute1.

    UserAttribute1 = fn:Parse(${pattern1.Summary},'This server has a (.*) problem') = major

     

     

    MichaelBoehm



  • 3.  Re: How to parse variable in Event Policy SOI 4.0

    Posted Sep 06, 2016 03:45 AM

    Hi Michael,

     

    Thanks for the reply.

    Yes I knew, about Parse function, but seems the Parse function is not working as expected. Please see below picture:

     

    I am sure that Regex is working:

     

    The output should be oracle, but the value oracle not displayed in preview.

     

    I also followed this guide but it still doesn't work :

    http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/tec579104.aspx 

     

    Do you have another suggestion for me? MichaelBoehm Brahma

     

    Best Regards,

    Okik



  • 4.  Re: How to parse variable in Event Policy SOI 4.0

    Posted Sep 06, 2016 03:58 AM

    Hi Okik,

     

    you are not using the proper method to reference the variable for the Message.

    Please look at my example.

    You are using $(Message), which is not a valid variable.

    You have to use the reference ${pattern1.Message} in an Event Policy.

     

    MichaelBoehm



  • 5.  Re: How to parse variable in Event Policy SOI 4.0

    Posted Sep 06, 2016 04:03 AM

    Hi Michael,

     

    I have tried using ${pattern1.Message} in an Event Policy, but it still doesn't work. Please see below picture:

     

    MichaelBoehm

     

    Best Regards,

    Okik



  • 6.  Re: How to parse variable in Event Policy SOI 4.0

    Posted Sep 06, 2016 04:18 AM

    Hi Okik,

    to which SOI Attribute do you want to map the extracted value?

    You seem to work in the wrong part of the UI.

    Your screenshots are all from the top part (which is only used when providing input for SQL queries) - sorry, I did not recognize that earlier.

    You have to use the bottom part of the UI in the way I showed in my example. 

     

    MichaelBoehm



  • 7.  Re: How to parse variable in Event Policy SOI 4.0

    Posted Sep 06, 2016 04:31 AM

    Hi Michael,

     

    Sorry for the unclear screenshot. Here's the full screenshot

     

    I am working for User Attribute 1. For more references: http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/tec579104.aspx 

     

    Best Regards,

    Okik



  • 8.  Re: How to parse variable in Event Policy SOI 4.0

    Posted Sep 06, 2016 04:51 AM

    Hi Okik,

    to better understand the problem I would like to go one step back:

    what type of Enrichment Policy do you try to develop?

    • Map only
    • SQL Query against a DB
    • script call

    Can you please provide a screencapture of the previous pages of the Event Policy Editor to get the full picture.

    I have the feeling that we talk about different scenarios and thus my answers were not the proper ones to the scenario you want to develop.

     

    MichaelBoehm



  • 9.  Re: How to parse variable in Event Policy SOI 4.0
    Best Answer

    Posted Sep 06, 2016 05:06 AM

    Hi Okik,

    I think I found the problem:

    Your Parse is extracting the second part of the message (as you can also see in the preview), because you enclose the second part in parenthesis ().

    You have to enclose the part in parenthesis which you want to have as result.

    Thus, your pattern should look like:

    (^[^:]+).*

     

    MichaelBoehm



  • 10.  Re: How to parse variable in Event Policy SOI 4.0

    Posted Sep 07, 2016 03:43 AM

    Hi Michael,

     

    Thank you, the pattern is working fine now.

    Can you help me for this Event Enrichment for UIM to SOI not working ? 

     

    Best Regards,

    Okik