| Sub parameters (if applicable) | | |
---|
| | Specify the name of the input record.
Example
mapping_file_path = { "MappingDetails" : [{"inputkey": "EventID","outputkey": "SourceEventID","type": "assignment"}]} input_record = {'EventID'=>688,'Display Name'=>'Agent'} output_record = [{'SourceEventID'=>688,'Display Name'=>'Agent'}]
| |
| | Add key in hash or array of hash.
Example
mapping_json_file = { "MappingDetails" : [{"inputkey":"message.results","outputkey":"kind","type":"add_key","datatype":"array","childinputkey":"CI"}]} input_record = {"message.results" =>[{'EventID'=>688}]} output_record = [{'EventID'=>688,'kind'=>'CI'}]
| |
| Add a key in the array of hash format. | |
| Assign a value to the newly added key. If there is no value assigned, assign the key as is. | |
| Replace the input key with the outputkey.
Example
mapping_file_path = { "MappingDetails" : [{"inputkey": "EventID","outputkey": "SourceEventID","type": "assignment"}]} input_record = {'EventID'=>688,'Display Name'=>'Agent'} output_record = [{'SourceEventID'=>688,'Display Name'=>'Agent'}]
| |
| Concatenate the input keys. Supported options:
- Concatenate with a value from the input record
- Concatenate with an environment variable
- Concatenate with a constant value
delimiter: Define the delimiter by using which you want to concatenate the input keys. If you do not specify a delimiter, the input keys are concatenated without any delimiter.
Example
mapping_json_file = { "MappingDetails" : [{inputkey": "Test1,EventID,Test2","source_identifier": "class","type": "concat","delimiter":"-"}]} input_record = {'EventID'=>1014} output_record = [{'EventID'=>1014,'source_identifier'=>'Test1-1014-Test2'}]
| |
| Assign the input key value as is to the output key.
Example
mapping_json_file = { "MappingDetails" : [{inputkey": "SolarWindsEvent","outputkey": "class","type": "constant"}]} input_record = {'EventID'=>688} output_record = [{'EventID'=>688,'class'=>'SolarWindsEvent'}]
| |
| The output record is as an array of input key values.
Example
mapping_file_path = { "MappingDetails" : "ClosedAlertMappingDetails":[{"inputkey":"results","childinputkey":"AlertActiveID","outputkey":"eventIds","type": "convert_to_array"}]} input_record = [{"AlertActiveID":"6185"}, {"AlertActiveID":"6200"}, {"AlertActiveID":"6201"} output_record = {"eventIds":["6185","6200","6201"]}
| |
| Delete the specified key. Supported values: - Delete key: Delete the specified input key from a hash or array of hashes of input records
- childinputkey: Specify the input key that needs to be deleted from an array of hashes of input records
Example
mapping_json_file = {"MappingDetails":[{"inputkey":"items","type":"delete_data","childinputkey":"ciName"}]}
input_record = {"items"[{"data":{"ciName":"basepriority_1","ciHomeCell":"test-host-setup"},"kind":"BMC_BusinessService","id":"REGAA5V0FL9BIAQ3VCUFQ2WVT51BIM"}]} output_record = {"items":[{"data":{"ciHomeCell":"test-host-setup"},"kind":"BMC_BusinessService","id":"REGAA5V0FL9BIAQ3VCUFQ2WVT51BIM"}]}
| |
Delete the key based on specified value. Supported values:
- checkvalue: Specify this value if the user wants to delete a key from a hash or an array of hash matching the checkvalue.
- datatype: Need to give value as "array" if user wants to delete key from hash which in array of hash having matching checkvalue
Example
Delete a key based on a given value
mapping_json_file = {"MappingDetails":[{"inputkey":"attributes","type":"delete_data","datatype":"array","childinputkey":"name","checkvalue":"mc_smc_impact"}]}
input_record = {'attributes'=>[{'name'=>'mc_tool_time','dataType'=>'DATE','default'=>'0','enum'=>false,'enumElements'=>[],'allFacet'=>[{'name'=>'parse','value'=>'true'}]},{'name'=>'mc_smc_impact','dataType'=>'MC_SMC_IMPACT','default'=>'NOT_ELECTED','enum'=>true,'enumElements'=>[{'value'=>'NOT_ELECTED','index'=>0},{'value'=>'ELECTED','index'=>1}]},{'name'=>'mc_bad_slot_names','dataType'=>'STRING_LIST','default'=>'[]','enum'=>false,'enumElements'=>[],'allFacet'=>[{'name'=>'parse','value'=>'true'}]}]}
output_record = {'attributes'=>[{'name'=>'mc_tool_time','dataType'=>'DATE','default'=>'0','enum'=>false,'enumElements'=>[],'allFacet'=>[{'name'=>'parse','value'=>'true'}]},{'name'=>'mc_bad_slot_names','dataType'=>'STRING_LIST','default'=>'[]','enum'=>false,'enumElements'=>[],'allFacet'=>[{'name'=>'parse','value'=>'true'}]}]}
| |
delete_row : Delete rows based on the specified conditions Required configurations:
- Conditions: Specify the conditions based on which the rows will be deleted. Valid values:
- condition_operator: Specify the conditional operators. Valid values: greater_than, greater_than_equal_to, less_than, less_than_equal_to, equals,
not_equals, not_null, null, empty, not_empty, contains. - left_expression: Specify the value for the left-hand side expression. It might contain the Context value that needs to be fetched from 'config-file-path'.
- right_expression: Specify the value for the right-hand side expression. It might contain the Context value that needs to be fetched from 'config-file-path'.
- logical_operator: Use these operators if you want to specify more than one conditions. Valid values: and, or.
Example
mapping_json_file = {"MappingDetails":[{ "conditions": [{"condition_operator":"not_null","left_expression":"{{CONTEXT_PARAMETER.PREV_FETCH_TIME}}","right_expression":"","logical_operator":"AND"},{"condition_operator":"greater_than","left_expression":"mc_date_modification","right_expression":"date_reception","logical_operator":"AND"},{"condition_operator":"less_than","left_expression":"date_reception","right_expression":"{{CONTEXT_PARAMETER.PREV_FETCH_TIME}}","logical_operator":""}], "type": "delete_row" }]} input_record = [{"_handle":"86019","_identifier":"TSOM_mc.pncell_test-host-setup1.20487282.0","source_address":"<IP Address>","source_hostname":"test-host-setup3","location":"Unknown","source_identifier":"TSOM-38882c31-2c96-4ef9-9877-ac5b38418ca8-test-host-setup3","sub_category":"OTHER","date_reception":"1615357516","priority":"PRIORITY_5","_repeat_count":"0","_cause":"0","_timeout":"0","mc_tool_address":"<IP Address>","mc_modhist":"['pncell_test-host-setup3']","mc_tool_time":"1615360642","mc_smc_impact":"NOT_ELECTED","mc_event_model_version":"1.1.00","status":"OPEN","mc_relationships":"0/0","mc_client_address":"<IP Address>","mc_collectors":"['1.1', '3.1.1', '4.1', '5.1']","mc_history":"['test-host:86019']","pn_detail_diag_count":"0","mc_date_modification":"1615360647","date":"20210309191722.000000-720","mc_original_priority":"PRIORITY_5","msg":"9th march test event 30","CLASS":"EVENT","mc_host_id":"0","mc_incident_report_time":"1615360642","mc_smc_priority":"0","mc_original_severity":"MAJOR","mc_local_reception_time":"1615360642","duration":"0","pn_detail_diag":"0","mc_arrival_time":"1615360642","severity":"MAJOR","mc_action_count":"0","mc_incident_time":"0"},{"_handle":"86027","_identifier":"TSOM_mc.pncell_test-host-setup1.20487282.0","source_address":"<IP Address>","source_hostname":"test-host","location":"Unknown","source_identifier":"TSOM-38882c31-2c96-4ef9-9877-ac5b38418ca8-test-host-setup3","sub_category":"OTHER","date_reception":"1615360642","priority":"PRIORITY_5","_repeat_count":"0","_cause":"0","_timeout":"0","mc_tool_address":"<IP Address>","mc_modhist":"['pncell_test-host-setup3']","mc_tool_time":"1615360642","mc_smc_impact":"NOT_ELECTED","mc_event_model_version":"1.1.00","status":"OPEN","mc_relationships":"0/0","mc_client_address":"<IP Address>","mc_collectors":"['1.1', '3.1.1', '4.1', '5.1']","mc_history":"['test-host:86027']","pn_detail_diag_count":"0","mc_date_modification":"1615360642","date":"20210309191722.000000-720","mc_original_priority":"PRIORITY_5","msg":"9th march test event 30","CLASS":"EVENT","mc_host_id":"0","mc_incident_report_time":"1615360642","mc_smc_priority":"0","mc_original_severity":"MAJOR","mc_local_reception_time":"1615360642","duration":"0","pn_detail_diag":"0","mc_arrival_time":"1615360642","severity":"MAJOR","mc_action_count":"0","mc_incident_time":"0"}]
output_record = [{"_handle":"86027","_identifier":"TSOM_mc.pncell_test-host-setup1.20487282.0","source_address":"<IP Address>","source_hostname":"test-host-setup3","location":"Unknown","source_identifier":"TSOM-38882c31-2c96-4ef9-9877-ac5b38418ca8-test-host-setup3","sub_category":"OTHER","creation_time":"1615360642","priority":"PRIORITY_5","_repeat_count":"0","_cause":"0","_timeout":"0","mc_tool_address":"<IP Address>","mc_modhist":"['pncell_test-jost-setup3']","mc_tool_time":"1615360642","mc_smc_impact":"NOT_ELECTED","mc_event_model_version":"1.1.00","status":"OPEN","mc_relationships":"0/0","mc_client_address":"10.133.187.35","mc_collectors":"['1.1', '3.1.1', '4.1', '5.1']","mc_history":"['pncell_test-host-setup3:86027']","pn_detail_diag_count":"0","mc_date_modification":"1615360642","date":"20210309191722.000000-720","mc_original_priority":"PRIORITY_5","msg":"9th march test event 30","CLASS":"EVENT","mc_host_id":"0","mc_incident_report_time":"1615360642","mc_smc_priority":"0","mc_original_severity":"MAJOR","mc_local_reception_time":"1615360642","duration":"0","pn_detail_diag":"0","mc_arrival_time":"1615360642","severity":"MAJOR","mc_action_count":"0","mc_incident_time":"0"}]
| |
delete_and_move_row : Stores the data to be deleted in one file and then deletes the row matching the specified condition. Configuration needed:
- Conditions: Specify the conditions based on which the rows will be deleted. Valid values:
- condition_operator: It will specify the conditional operators: greater_than, greater_than_equal_to, less_than, less_than_equal_to, equals, not_equals, not_null, null, empty, not_empty, contains. They are used for comparing left_expression and right_expression
- left_expression: Record value to compare with right_expression.
- right_expression: Record value to compare with left_expression.
- logical_operator: It will be specified if there is more than one condition. Values are and, or.
Example
mapping_json_file = {"MappingDetails":[{ "conditions": [{"condition_operator":"not_null","left_expression":"{{CONTEXT_PARAMETER.PREV_FETCH_TIME}}","right_expression":"","logical_operator":"AND"},{"condition_operator":"greater_than","left_expression":"mc_date_modification","right_expression":"date_reception","logical_operator":"AND"},{"condition_operator":"less_than","left_expression":"date_reception","right_expression":"{{CONTEXT_PARAMETER.PREV_FETCH_TIME}}","logical_operator":""}], "file_name_with_path":"/fluentd/etc/data/tsom_update_event_payload.json", "type": "delete_and_move_row" }]}
input_record = [{"_handle":"86019","_identifier":"TSOM_mc.pncell_test-host-setup1.20487282.0","source_address":"<IP Address>","source_hostname":"test-host-setup3","location":"Unknown","source_identifier":"TSOM-38882c31-2c96-4ef9-9877-ac5b38418ca8-test-host","sub_category":"OTHER","date_reception":"1615357516","priority":"PRIORITY_5","_repeat_count":"0","_cause":"0","_timeout":"0","mc_tool_address":"<IP Address>","mc_modhist":"['pncell_test-host']","mc_tool_time":"1615360642","mc_smc_impact":"NOT_ELECTED","mc_event_model_version":"1.1.00","status":"OPEN","mc_relationships":"0/0","mc_client_address":"10.133.187.35","mc_collectors":"['1.1', '3.1.1', '4.1', '5.1']","mc_history":"['test-host:86019']","pn_detail_diag_count":"0","mc_date_modification":"1615360647","date":"20210309191722.000000-720","mc_original_priority":"PRIORITY_5","msg":"9th march test event 30","CLASS":"EVENT","mc_host_id":"0","mc_incident_report_time":"1615360642","mc_smc_priority":"0","mc_original_severity":"MAJOR","mc_local_reception_time":"1615360642","duration":"0","pn_detail_diag":"0","mc_arrival_time":"1615360642","severity":"MAJOR","mc_action_count":"0","mc_incident_time":"0"},{"_handle":"86027","_identifier":"TSOM_mc.pncell_test-host-setup1.20487282.0","source_address":"<IP Address>","source_hostname":"test-host-setup3","location":"Unknown","source_identifier":"TSOM-38882c31-2c96-4ef9-9877-ac5b38418ca8-test-host-setup3","sub_category":"OTHER","date_reception":"1615360642","priority":"PRIORITY_5","_repeat_count":"0","_cause":"0","_timeout":"0","mc_tool_address":"<IP Address>","mc_modhist":"['pncell_test-host-setup3']","mc_tool_time":"1615360642","mc_smc_impact":"NOT_ELECTED","mc_event_model_version":"1.1.00","status":"OPEN","mc_relationships":"0/0","mc_client_address":"10.133.187.35","mc_collectors":"['1.1', '3.1.1', '4.1', '5.1']","mc_history":"['test-host:86027']","pn_detail_diag_count":"0","mc_date_modification":"1615360642","date":"20210309191722.000000-720","mc_original_priority":"PRIORITY_5","msg":"9th march test event 30","CLASS":"EVENT","mc_host_id":"0","mc_incident_report_time":"1615360642","mc_smc_priority":"0","mc_original_severity":"MAJOR","mc_local_reception_time":"1615360642","duration":"0","pn_detail_diag":"0","mc_arrival_time":"1615360642","severity":"MAJOR","mc_action_count":"0","mc_incident_time":"0"}]
output_record = [{"_handle":"86027","_identifier":"TSOM_mc.pncell_test-host-setup1.20487282.0","source_address":"<IP Address>","source_hostname":"test-host-setup3","location":"Unknown","source_identifier":"TSOM-38882c31-2c96-4ef9-9877-ac5b38418ca8-test-host-setup3","sub_category":"OTHER","creation_time":"1615360642","priority":"PRIORITY_5","_repeat_count":"0","_cause":"0","_timeout":"0","mc_tool_address":"10.133.187.35","mc_modhist":"['pncell_test-host-setup3']","mc_tool_time":"1615360642","mc_smc_impact":"NOT_ELECTED","mc_event_model_version":"1.1.00","status":"OPEN","mc_relationships":"0/0","mc_client_address":"10.133.187.35","mc_collectors":"['1.1', '3.1.1', '4.1', '5.1']","mc_history":"['pncell_test-host-setup3:86027']","pn_detail_diag_count":"0","mc_date_modification":"1615360642","date":"20210309191722.000000-720","mc_original_priority":"PRIORITY_5","msg":"9th march test event 30","CLASS":"EVENT","mc_host_id":"0","mc_incident_report_time":"1615360642","mc_smc_priority":"0","mc_original_severity":"MAJOR","mc_local_reception_time":"1615360642","duration":"0","pn_detail_diag":"0","mc_arrival_time":"1615360642","severity":"MAJOR","mc_action_count":"0","mc_incident_time":"0"}]
| |
| Encapsulate the given input keys under the specified output key value. childoutputkey : Specify the value so that input keys can be encapsulated under this field.
Example
mapping_json_file = {"MappingDetails":[{"inputkey":"message.results","outputkey":"items","childoutputkey":"data",type":"encapsulate"}]} input_record = {"message.results":[{"data":{"ciName":"basepriority_1","ciHomeCell":"pncell_test-host-setup2"},"kind":"BMC_BusinessService","id":"REGAA5V0FL9BIAQ3VCUFQ2WVT51BIM"}]} output_record = {"items":[{"data":{"ciHomeCell":"pncell_test-host-setup2"},"kind":"BMC_BusinessService","id":"REGAA5V0FL9BIAQ3VCUFQ2WVT51BIM"}]}
| |
| Replace the value specified in the environment_variable.
Example
mapping_json_file = { "MappingDetails" : [{inputkey": "source_identifier","outputkey": "source","type": "enviornment_variable"}]} if ENV["source_identifier"]="test123" input_record = {'EventID'=>688} output_record = [{'EventID'=>688,'source'=>'test123'}]
| |
| Read the input key value assign the corresponding value from the lookup Map to the output key.
Example
mapping_json_file = {"MappingDetails":[{"inputkey": "Icon","outputkey": "severity","type": "lookup", "lookupMap": [{"Add": "INFO","Critical": "CRITICAL","Disabled": "MAJOR","Error": "MAJOR"}]}]} input_record = {'Icon'=>'Add','EventID'=>688} output_record = [{'EventID'=>688,'severity'=>'INFO'}]
| |
| Merge two input records that are either in the hash format or array format.
Example
mapping_json_file = {"MappingDetails":[{"inputkey":"data","outputkey":"samples","inpputkeytomerge":"values","inpputkeytomergewith":"timestamps","type":"merge_record"}]} input_record = {"message.result"=>[{"metricId"=>"builtin:host.cpu.usage:names","data"=>[{"dimensions"=>["zwl-np-tspsl-1.onbmc.com","HOST-9785505BCFCF9B50"],"dimensionMap"=>{"dt.entity.host.name"=>"zwl-np-tspsl-1.onbmc.com","dt.entity.host"=>"HOST-9785505BCFCF9B50"},"timestamps"=>[nil,nil,1618557540000,1618557600000,1618557660000,1618557720000],"values"=>[1.9063517252604167,2.13470458984375,1.8023274739583333,1.94189453125,nil,nil]}]}]} output_record = [{"samples"=>[{:values=>1.9063517252604167,:timestamp=>''},{:values=>2.13470458984375,:timestamp=>''},{:values=>1.8023274739583333,:timestamp=>1618557540000},{:values=>1.94189453125,:timestamp=>1618557600000},{:values=>'',:timestamp=>1618557660000},{:values=>'',:timestamp=>1618557720000}],"metricId"=>"builtin:host.cpu.usage:names"}]
| |
| Specify a value for the prefix expression. The prefix expression is inserted before the output key and displayed in the output record.
Example
mapping_json_file = {"MappingDetails":[{"inputkey": "ciName","outputkey": "ciName","type": "prefix","value": "TSOM_"}]} input_record = {"message.results":{[{"data":{"ciName":"basepriority_1","ciHomeCell":"pncell_test-host-setup2"},"kind":"BMC_BusinessService","id":"REGAA5V0FL9BIAQ3VCUFQ2WVT51BIM"}]}} output_record = {"items":[{"data":{"ciName":"TSOM_basepriority_1","ciHomeCell":"pncell_test-host-setup2"},"kind":"BMC_BusinessService","id":"REGAA5V0FL9BIAQ3VCUFQ2WVT51BIM"}]}
| |
| Specify a value for the postfix expression. The output key is appended with the postfix expression and displayed in the output record.
Example
mapping_json_file = {"MappingDetails":[{"inputkey": "ciName","outputkey": "ciName","type": "postfix","value": "_TSOM"}]} input_record = {"message.results":{[{"data":{"ciName":"basepriority_1","ciHomeCell":"pncell_test-host-setup2"},"kind":"BMC_BusinessService","id":"REGAA5V0FL9BIAQ3VCUFQ2WVT51BIM"}]}} output_record = {"items":[{"data":{"ciName":"basepriority_1_TSOM","ciHomeCell":"pncell_test-host-setup2"},"kind":"BMC_BusinessService","id":"REGAA5V0FL9BIAQ3VCUFQ2WVT51BIM"}]}
| |
| Convert the input time according to the output time format specified and display it in the output record.
Example
mapping_file_path = { "MappingDetails" : [{"inputkey": "LocalEventTime","outputkey": "creation_time","type": "time","inputformat": "%Y-%m-%dT%H:%M:%S","outputformat": "EPOCH"}]} input_record = {'EventID'=>688,'LocalEventTime'=>'2020-10-18T05:38:39.8200000'} output_record = [{'EventID'=>688,'creation_time'=>1602979719}]
| |
| Change the value of the inputkey. You can replace a hash, array, or plain values.
- childinputkey: Specify the key if you want to replace the value of the input key in an array or hash.
- checkvalue: Specify the value to be replaced.
Example
mapping_file_path = { "MappingDetails" : [{"inputkey":"attributes","type":"value_assignment","childinputkey":"dataType","checkvalue":"MC_EVENT_CATEGORY","assignmentvalue":"CATEGORY"}]} input_record = {"attributes": [{"name":"mc_event_category","dataType":"MC_EVENT_CATEGORY","default":"","enum":true,"enumElements":[{"value":"","index":0}],"allFacet":[{"name":"parse","value":"true"}]}]} output_record = {"attributes":[{"name":"mc_event_category","dataType":"CATEGORY","default":"","enum":true,"enumElements":[{"value":"","index":0}],"allFacet":[{"name":"parse","value":"true"}]}]}
| |
| | Specify the output key. The input key is replaced with the output key in the output record.
Example
mapping_file_path = { "MappingDetails" : [{"inputkey": "EventID","outputkey": "SourceEventID","type": "assignment"}]} input_record = {'EventID'=>688,'Display Name'=>'Agent'} output_record = [{'SourceEventID'=>688,'Display Name'=>'Agent'}]
| |