9 Replies Latest reply: Sep 5, 2012 5:41 AM by Jayesh Panchal RSS

Dynamic Enrichment Policy not working

Jayesh Panchal

Hi Folks,

 

We have created dynamic enrichment policy for appending some keyword into event message.

 

Its working for Minor issues and not working for Critical one.

 

We again added a new selector and created policy but its not working even after.

 

Please give me some suggestion what to do in this case.

 

Regards,

Jayesh

  • 1. Re: Dynamic Enrichment Policy not working
    Niranjan Panigrahi

    Hello Jayesh,

     

    It could be possible that the CRITICAL event that you see is a upgraded event i.e. the previous seveiry was MINOR or MAJOR and later the severity was upgraded to CRITICAL.

     

    In that case the policy won't fire.

     

    You can check if that is a upgraded event by check the value of the slot "Orignal_Severity"

     

    In that case you can follow the steps below to workaround the same

     

    1. On BPPM Admin Console, go to the policy tab, find out the propagation policy you're currently using. Click menu File->Export to export the policy to a BAROC format file c:\temp\output.baroc, 

    2. Open the output.baroc file, modify the last 3 lines before "END" to following:

    when_slot='severity';
    when_operator='within';
    when_value='[CRITICAL,MINOR]';

     


    4. Save the file and use following command line to execute the modification:

     

    mposter -n cellname -d c:\temp\output.baroc

     

    Now it will consider both the MINOR AND CRITICAL events

     

     

    Regards,

    Niranjan

  • 2. Re: Dynamic Enrichment Policy not working
    Jayesh Panchal

    Hello Niranjan,

     

    Thanks for the valuable info.

     

    But we are not upgrading any event.These events come from TM ART directly.

     

    So what is your thought on this.Why its not happening for CRITICAL.

     

    Regards,

    Jayesh

  • 3. Re: Dynamic Enrichment Policy not working
    Niranjan Panigrahi

    Hi Jayesh,

     

    Can you send me the event (in baroc format) which you think is not working.

     

    Also a copy of the selector and entichment policy  that you are using.

    To copy it you need to select the selectory\policy in the admin console and click on the copy icon at the top

     

    Regards,

    Niranjan

  • 4. Re: Dynamic Enrichment Policy not working
    Jayesh Panchal

    Hi Niranjan,

     

    We are not using propagation policy...we are using dynamic enrichment policy.

     

    and when i tried to execute mposter commant..it gives me error that slot "when_slot" is undefined.

     

    Please guide me whats wrong in this.

     

    Regards,

    Jayesh

  • 5. Re: Dynamic Enrichment Policy not working
    Jayesh Panchal

    I have attached baroc file above.

  • 6. Re: Dynamic Enrichment Policy not working
    Niranjan Panigrahi

    Hello Jayesh,

     

    Yeah I haven't mentioned anything about the propagation policy in this discussion.   we are taking about the enrichment policy from the very begenning.

     

    I looked into the baroc file and thats exactly what I was pointing in my first note. Your dynamic enrichment policy is not working because the event severity has been upgraded. initally it was MINOR then it was upgraded to CRITICAL.

    The following slots in the event details says it all

     

    mc_original_severity=MINOR;

    severity=CRITICAL;


    Can you also attach the file that you are trying to mposter.

  • 7. Re: Dynamic Enrichment Policy not working
    Jayesh Panchal

    I have attached the baroc file I am trying to mposter.

     

    You mentioned propagation policy in your first reply in 1st point thats why I asked.

     

    Are you confirm that those above slots will recognize for dynamic enichment policy because I see those slots only in propagation and notification policy only.

     

    You just try adding those slots and mposter it and let me know if it executes successfully.

     

    Regards,

    Jayesh

  • 8. Re: Dynamic Enrichment Policy not working
    Niranjan Panigrahi

    Hello Jayesh,

     

    My bad, you can import the policy by making certain changes to the "im_policies.baroc" file but still only that change won't work because the way the DDEN policy is defined in the im_internal.mrl rule. Basically  dden_policy_rure is a refine rule and we cannot use the WHEN clause. So the workaround it to convert the DDEN_POLICY from a refine to execute rule.

     

    So here are the steps you need to follow:

    NOTE: Make necessary backup of the files that you need to modify in the steps below

     

    1) Modify the "im_policies.baroc" file located in the classes directory.
    There should be a section for the IM_DDEN_POLICY "MC_DATA_CLASS: IM_DDEN_POLICY ISA IM_POLICY" Mody this section to include the when slots as given below:


    MC_DATA_CLASS: IM_DDEN_POLICY ISA IM_POLICY
        DEFINES
        {
    execution_order         : INTEGER, default=1;
    event_class             : STRING;
            lookup_table            : STRING;
            lookup_table_tag        : STRING;
            match_fields            : LIST_OF STRING;
            output_fields           : LIST_OF STRING;
            trace                   : MC_YESNO, default=NO;
    data_file               : STRING;
    data_file_separator     : STRING;
    pmep_file               : STRING;
    last_import_time        : STRING;
    last_import_type        : STRING;
    num_of_total_records    : INTEGER;
        num_of_failed_records   : INTEGER;
    when_slot  : STRING, default=status;
    when_operator  : STRING;
    when_value  : STRING;
        };
    END

    2) Modify the im-internal.mrl rule located in the rules directory

    Here you need modify the DDEN_POLICY from a refine to execute rule.
    There should be a section for the DDEN_POPLICY like this

    #===============================================================================
    # Data Driven Enrichment rule
    #
    # Uses IM_DDEN_POLICY entries to control dynamic data enrichment

    The modified rule should look like this

     

     

    execute dden_policy_rule:
            using_policy ALL
            {
                index dden_index [] ($POL) where
                        [ ($POL.enabled == 1) AND $POL.during_schedule == YES ]
                sort [ ordinal ASC ]
            }
            $POL.selector_ecf ($EV) where [ $EV.status != CLOSED AND $EV.status != BLACKOUT ]
    when(EV, $POL.when_slot, $POL.when_operator, $POL.when_value)
            {
     
                    $L = get_list_slotvalues( [$EV], $POL.match_fields );

                    find_match_entry( "DDEN_MATCH_TABLE", $POL.lookup_table_tag,
                               $L,
                               $MATCH );

                    apply_match_entry($MATCH, $L, [ $EV ], $L_OUT); 
                    set_list_slotvalues( [$EV], $POL.output_fields, $L_OUT );

                    opadd($EV, $POL.name, "Dynamic Data Enrichment", "");

                    if ($POL.trace == YES) then
                    {
                        ntadd($EV, concat(["DDEN policy: ", $POL.name,
                                   " matching: ", $MATCH.name, " in  ", $MATCH.tag]));
                    };
            }
    END


    3) Recompile the Cell.
    4) Restart the cell


    Now you will be able to impost the policy sucecssfully.

     

    The changes that I have made to the default file are underlined

     

    Regards,

    Niranjan

  • 9. Re: Dynamic Enrichment Policy not working
    Jayesh Panchal

    Hi Niranjan,

     

    I have made changes as per your suggestion.

     

    But It didnt affect.I dont know why.

     

    Cell compilation done successfully.

     

    I got below output after mposter.tell me if its right.

     

    BMC Impact Poster 8.6.02 (Build 221113668
    -  6-Mar-2012)

    Copyright 1998-2011 BMC Software, Inc.
    as an unpublished work.  All rights reserved.

     

    It didnt show me that command executed successfully.

     

    Do we need to restart server inorder to affact?

     

    Regards,

    Jayesh