7 Replies Latest reply: Jun 11, 2012 4:55 AM by Lalit Gupta RSS

enrichment of slots in parenthesis

Lalit Gupta

hi,

    we have configured bppm to receive snmp traps from networker. Because of unavailability of MIB for networker, we are trying to make a dynamic enrichment rule in bem, to translate value of the slot snmp_vals into the "msg" slot so that the trap message can be seen in bppm and further into remedy. However, the value of snmp_vals is in parenthesis and when the data file is imported into the cell, the following error is thrown...

 

           the placeholdes %s is incompatible with type list_of(atoms).

 

   if we try to translate a value which is not in parenthesis, we are successful. In this case, how can we translate values appearing in parenthesis ?

 

regards

 

lalit

  • 1. enrichment of slots in parenthesis
    Ganesh Suresh

    Can you please copy and paste one example event..? I can help you with the rule.

    Recently even i had the very similar requirement..

     

    Thanks,

    Ganesh

  • 2. enrichment of slots in parenthesis
    Lalit Gupta

    Hi ,

     

    Below is one of sample snmp trap event.I want to snmp_vals slot into msg slot.

     

    SNMP_ENTERPRISE;

    acl=['admin'];

    adapter_host='zimmer-bppm.nam.zimmer.com';

    administrator='';

    credibility=1;

    date='20120607123910.000000-300';

    date_reception=1339087150;

    duration=0;

    event_handle=679159;

    hostname='';

    itsm_assignedGroup='';

    itsm_assignedGroupID='';

    itsm_assignee='';

    itsm_category='';

    itsm_company='';

    itsm_incidentnumber='';

    itsm_item='';

    itsm_location='';

    itsm_manufacturer='';

    itsm_model_version='';

    itsm_operational_category1='';

    itsm_operational_category2='';

    itsm_operational_category3='';

    itsm_product_name='';

    itsm_supportCompany='';

    itsm_supportOrganization='';

    itsm_type='';

    mc_abstracted=[];

    mc_abstraction=[];

    mc_account='';

    mc_acl=[];

    mc_action_count=0;

    mc_arrival_time=1339087150;

    mc_associations=[];

    mc_bad_slot_names=[];

    mc_bad_slot_values=[];

    mc_cause=0;

    mc_client_address='10.203.60.1';

    mc_collectors=[''1.1.1'',''3.1.1''];

    mc_date_modification=1339087150;

    mc_effects=[];

    mc_event_category=;

    mc_event_model_version='1.1';

    mc_event_relations=[];

    mc_event_subcategory=OTHER;

    mc_history=[];

    mc_host='zimmer-bppm.nam.zimmer.com';

    mc_host_address='10.203.60.243';

    mc_host_class='';

    mc_host_id=1;

    mc_incident_report_time=1339087150;

    mc_incident_time=0;

    mc_it_mgmt_process='';

    mc_local_reception_time=1339087150;

    mc_location='nam.zimmer.com';

    mc_long_msg='';

    mc_modhist=[''pncell_zimmer-bppm''];

    mc_notes=[];

    mc_notification_history=[];

    mc_object='Snmp';

    mc_object_class='MA::ESnmpTrap';

    mc_object_owner='';

    mc_object_uri='';

    mc_operations=['0x4fd0d92e',''tcs_im_internal.mrl:refine dden_policy_rule'','Priority_SeverityMapping',''Dynamic Data Enrichment'',''''];

    mc_origin='Snmp';

    mc_origin_class='MA::ESnmpTrap';

    mc_origin_key='';

    mc_origin_sev='';

    mc_original_priority=PRIORITY_5;

    mc_original_severity=OK;

    mc_owner='';

    mc_parameter='';

    mc_parameter_threshold='';

    mc_parameter_unit='';

    mc_parameter_value='';

    mc_priority=PRIORITY_5;

    mc_propagations=[''pn_server_zimmer-bppm:2171''];

    mc_relation_source='';

    mc_service='';

    mc_smc_alias='BMC_ComputerSystem:zimmer-bppm:nam.zimmer.com';

    mc_smc_causes=[];

    mc_smc_effects=[];

    mc_smc_id='zimmer-bppm_1';

    mc_smc_impact=IMPACTING;

    mc_smc_priority=0.000000e+000;

    mc_smc_type='BMC_ComputerSystem';

    mc_timeout=0;

    mc_tool='enterprises';

    mc_tool_address='10.203.60.1';

    mc_tool_class='SnmpTrap';

    mc_tool_id='';

    mc_tool_key='';

    mc_tool_rule='';

    mc_tool_sev='';

    mc_tool_suggestion='';

    mc_tool_time=1339087150;

    mc_tool_uri='';

    mc_ueid='mc.pncell_zimmer-bppm.fd0d92e.0';

    msg='';

    msg_catalog='';

    msg_index=0;

    num_actions=0;

    origin='';

    pn_detail_diag=0;

    pn_detail_diag_count=0;

    pn_device_name='zimmer-bppm.nam.zimmer.com';

    repeat_count=0;

    server_handle=0;

    severity=CRITICAL;

    site='';

    snmp_community='public';

    snmp_contextEngineID='N/A';

    snmp_contextName='N/A';

    snmp_enterprise='1.3.6.1.4.1.2854';

    snmp_enterprise_str='enterprises';

    snmp_error_index=-1;

    snmp_error_status=-1;

    snmp_oids=[''1.3.6.1.4.1.1643''];

    snmp_oidst=['enterprises'];

    snmp_request_id=-1;

    snmp_securityEngineID='N/A';

    snmp_securityLevel='N/A';

    snmp_securityModel='N/A';

    snmp_securityName='N/A';

    snmp_source_addr='10.203.60.243';

    snmp_specific=1;

    snmp_time_ticks=29081600;

    snmp_trap_type=6;

    snmp_trap_type_str='enterpriseSpecific';

    snmp_vals=[''some sample snmp trap message - 1','another test','test another''];

    snmp_version=0;

    source='';

    status=OPEN;

    sub_origin='';

    sub_source='';

    symptoms='';

    Team_Contact_Number='';

    Team_Name='';

    END

  • 3. enrichment of slots in parenthesis
    Rahul NameToUpdate

    Hello Lalith,

     

    You can use something like that:

    refine Communities:EVENT($E)

    where[$E.status == OPEN]

    {

     

    listwalk($E.snmp_vals,$SLTNM);

    $E.msg=$E.msg || $SLTNM;

    }

    END

     

    You can concat values of snmp_vals in Message slot of the event.

     

    Please try it and let us know it.

     

    Thanks,

    Rahul

  • 4. Re: enrichment of slots in parenthesis
    Lalit Gupta

    The rule is compiled and applied,but the event seems to not following it and still output is blank message.

  • 5. enrichment of slots in parenthesis
    Ganesh Suresh

    Check this out :-

     

    new bmc_community_test: SNMP_ENTERPRISE ($EV)

      where [$EV.status != CLOSED] #you need to update the ECF as per your requirement

      triggers

    ##snmp_vals=[''some sample snmp trap message - 1','another test','test another''];

        {

    $val1  = listgetelt($EV.snmp_vals, 1);

    $val2  = listgetelt($EV.snmp_vals, 2);

    $val3 = listgetelt($EV.snmp_vals, 3);

    $EV.msg = $val1;

    #$EV.mc_host = $val2;                # example

    #$EV.mc_host_class = $val3;   # example u can map the slots according to ur requirement

    }

    END

     

    Let me know if this helps..

     

    Thanks,

    Ganesh

  • 6. Re: enrichment of slots in parenthesis
    Lalit Gupta

    Thanks ...Its working ...just did below modifications in your rule.

     

    refine Networker_SNMP_Traps:EVENT($E)

    where[$E.status == OPEN]

    {

    listwalk($E.snmp_vals,$SLTNM);

    $E.msg=concat([$E.msg,$SLTNM]);

    }

    END

     

    Thanks

    -Lalit

  • 7. Re: enrichment of slots in parenthesis
    Lalit Gupta

    Hi ,

     

    I am getting the below error event while generating the snmp trap alert.

     

    MC_CELL_PROCESS_ERROR;

    acl=['admin'];

    adapter_host='';

    administrator='';

    cell_location='10.203.60.1/1828';

    cell_name='pncell_zimmer-bppm';

    credibility=1;

    date='20120611041351.000000-300';

    date_reception=1339402431;

    duration=0;

    error_code=1001;

    error_goal='refine_networker_snmp_trap__snmp_parseout_msg(SNMP_ENTERPRISE,0x43236d8)';

    error_message='';

    error_source='';

    event='mc.pncell_zimmer-bppm.fd5a8bf.0';

    event_handle=691186;

    hostname='';

    itsm_assignedGroup='';

    itsm_assignedGroupID='';

    itsm_assignee='';

    itsm_category='';

    itsm_company='';

    itsm_incidentnumber='';

    itsm_item='';

    itsm_location='';

    itsm_manufacturer='';

    itsm_model_version='';

    itsm_operational_category1='';

    itsm_operational_category2='';

    itsm_operational_category3='';

    itsm_product_name='';

    itsm_supportCompany='';

    itsm_supportOrganization='';

    itsm_type='';

    mc_abstracted=[];

    mc_abstraction=[];

    mc_account='';

    mc_acl=[];

    mc_action_count=0;

    mc_arrival_time=1339402431;

    mc_associations=[];

    mc_bad_slot_names=[];

    mc_bad_slot_values=[];

    mc_cause=0;

    mc_client_address='';

    mc_collectors=[''1.1.1'',''3.1.1''];

    mc_date_modification=1339402431;

    mc_effects=[];

    mc_event_category=OPERATIONS_MANAGEMENT;

    mc_event_model_version='1.1.00';

    mc_event_relations=[];

    mc_event_subcategory=OTHER;

    mc_history=[];

    mc_host='zimmer-bppm';

    mc_host_address='10.203.60.1';

    mc_host_class='Computer';

    mc_host_id=1;

    mc_incident_report_time=0;

    mc_incident_time=1339402431;

    mc_it_mgmt_process='';

    mc_local_reception_time=1339402431;

    mc_location='Unknown';

    mc_long_msg='';

    mc_modhist=[''pncell_zimmer-bppm''];

    mc_notes=[];

    mc_notification_history=[];

    mc_object='pncell_zimmer-bppm';

    mc_object_class='Cell';

    mc_object_owner='';

    mc_object_uri='';

    mc_operations=[];

    mc_origin='pncell_zimmer-bppm';

    mc_origin_class='Cell';

    mc_origin_key='';

    mc_origin_sev='';

    mc_original_priority=PRIORITY_5;

    mc_original_severity=MINOR;

    mc_owner='';

    mc_parameter='';

    mc_parameter_threshold='';

    mc_parameter_unit='';

    mc_parameter_value='';

    mc_priority=PRIORITY_5;

    mc_propagations=[];

    mc_relation_source='';

    mc_service='';

    mc_smc_alias='zimmer-bppm_1';

    mc_smc_causes=[];

    mc_smc_effects=[];

    mc_smc_id='zimmer-bppm_1';

    mc_smc_impact=ATTACHED;

    mc_smc_priority=0.000000e+000;

    mc_smc_type='BMC_ComputerSystem';

    mc_timeout=0;

    mc_tool='pncell_zimmer-bppm';

    mc_tool_address='10.203.60.1';

    mc_tool_class='Cell';

    mc_tool_id='';

    mc_tool_key='';

    mc_tool_rule='';

    mc_tool_sev='';

    mc_tool_suggestion='';

    mc_tool_time=0;

    mc_tool_uri='';

    mc_ueid='mc.pncell_zimmer-bppm.fd5a8bf.1';

    msg='Error 1001 occurred during processing of event  691185: Evaluation of function listgetelt(['NetWorker media: (alert) Waiting for 1 writable volume(s) to backup pool \'Default\' disk(s) on nam-msg-n1.nam.zimmer.com'],0x2) failed';

    msg_catalog='';

    msg_index=0;

    num_actions=0;

    origin='';

    pn_detail_diag=0;

    pn_detail_diag_count=0;

    pn_device_name='zimmer-bppm.nam.zimmer.com';

    repeat_count=0;

    server_handle=0;

    severity=MINOR;

    site='';

    source='';

    status=OPEN;

    sub_origin='';

    sub_source='';

    symptoms='';

    Team_Contact_Number='';

    Team_Name='';

    END

     

     

    thanks

    Lalit