diff --git a/resources/otel/processors/transform_application.yaml b/resources/otel/processors/transform_application.yaml index 90f79e7ff..ef29f44bd 100644 --- a/resources/otel/processors/transform_application.yaml +++ b/resources/otel/processors/transform_application.yaml @@ -5,4 +5,4 @@ transform/application: statements: - flatten(body["event_data"], depth=1) - flatten(body["event_data"], depth=2) - - replace_all_patterns(body["event_data"], "key", "data.([0-9]).", "data_$$1") \ No newline at end of file + - replace_all_patterns(body["event_data"], "key", "^data.([0-9A-Za-z]+).", "data_$${1}_") # Transforms 'data..' keys. If is not empty, it formats as 'data_0_TargetUserName:"Administrator"'. Otherwise, it appears as 'data_0_:"Administrator"'. diff --git a/resources/otel/receivers/filelog.yaml b/resources/otel/receivers/filelog.yaml index e4fceb660..2c2e8a5e4 100644 --- a/resources/otel/receivers/filelog.yaml +++ b/resources/otel/receivers/filelog.yaml @@ -9,7 +9,7 @@ mac_run: | fi done - set_yaml_file_field_value "$OTEL_RECEIVERS_DIR/filelog.yaml" '.receiver.filelog/NAME.attributes.type' "$LOGS_TYPE" + set_yaml_file_field_value "$OTEL_RECEIVERS_DIR/filelog.yaml" '.receiver.filelog/NAME.resource.type' "$LOGS_TYPE" if [[ $? -ne 0 ]]; then echo -e "error setting type to filelog receiver: $(get_task_error_message)" >"$TASK_ERROR_FILE" return 3 @@ -26,7 +26,7 @@ linux_run: | fi done - set_yaml_file_field_value "$OTEL_RECEIVERS_DIR/filelog.yaml" '.receiver.filelog/NAME.attributes.type' "$LOGS_TYPE" + set_yaml_file_field_value "$OTEL_RECEIVERS_DIR/filelog.yaml" '.receiver.filelog/NAME.resource.type' "$LOGS_TYPE" if [[ $? -ne 0 ]]; then echo -e "error setting type to filelog receiver: $(get_task_error_message)" >"$TASK_ERROR_FILE" return 3 @@ -60,7 +60,7 @@ windows_run: | } } - $local:Err = Set-YamlFileFieldValue "$LogzioTempDir\resources\otel\receivers\filelog.yaml" '.receiver.filelog/NAME.attributes.type' $LogsType + $local:Err = Set-YamlFileFieldValue "$LogzioTempDir\resources\otel\receivers\filelog.yaml" '.receiver.filelog/NAME.resource.type' $LogsType if ($Err.Count -ne 0) { Write-Output "error setting type to filelog receiver: $($Err[0])" return 4 @@ -77,5 +77,5 @@ receiver: - type: move from: attributes["log.file.path"] to: attributes["log_file_path"] - attributes: + resource: type: diff --git a/resources/otel/receivers/windowseventlog_application.yaml b/resources/otel/receivers/windowseventlog_application.yaml index b2d0c1e85..904532308 100644 --- a/resources/otel/receivers/windowseventlog_application.yaml +++ b/resources/otel/receivers/windowseventlog_application.yaml @@ -20,7 +20,7 @@ windows_run: | return 1 } - $local:Err = Set-YamlFileFieldValue "$LogzioTempDir\resources\otel\receivers\windowseventlog_application.yaml" '.receiver.windowseventlog/application/NAME.attributes.type' $LogsType + $local:Err = Set-YamlFileFieldValue "$LogzioTempDir\resources\otel\receivers\windowseventlog_application.yaml" '.receiver.windowseventlog/application/NAME.resource.type' $LogsType if ($Err.Count -ne 0) { Write-Output "error setting type to windowseventlog/application receiver: $($Err[0])" return 3 @@ -36,5 +36,5 @@ receiver: windowseventlog/application/NAME: channel: Application exclude_providers: [] - attributes: + resource: type: \ No newline at end of file diff --git a/resources/otel/receivers/windowseventlog_security.yaml b/resources/otel/receivers/windowseventlog_security.yaml index 6f8de4e2a..e79189f16 100644 --- a/resources/otel/receivers/windowseventlog_security.yaml +++ b/resources/otel/receivers/windowseventlog_security.yaml @@ -20,7 +20,7 @@ windows_run: | return 1 } - $local:Err = Set-YamlFileFieldValue "$LogzioTempDir\resources\otel\receivers\windowseventlog_security.yaml" '.receiver.windowseventlog/security/NAME.attributes.type' $LogsType + $local:Err = Set-YamlFileFieldValue "$LogzioTempDir\resources\otel\receivers\windowseventlog_security.yaml" '.receiver.windowseventlog/security/NAME.resource.type' $LogsType if ($Err.Count -ne 0) { Write-Output "error setting type to windowseventlog/security receiver: $($Err[0])" return 2 @@ -29,5 +29,5 @@ windows_run: | receiver: windowseventlog/security/NAME: channel: Security - attributes: + resource: type: \ No newline at end of file diff --git a/resources/otel/receivers/windowseventlog_system.yaml b/resources/otel/receivers/windowseventlog_system.yaml index ff2ca71b0..f39ffb1dc 100644 --- a/resources/otel/receivers/windowseventlog_system.yaml +++ b/resources/otel/receivers/windowseventlog_system.yaml @@ -20,7 +20,7 @@ windows_run: | return 1 } - $local:Err = Set-YamlFileFieldValue "$LogzioTempDir\resources\otel\receivers\windowseventlog_system.yaml" '.receiver.windowseventlog/system/NAME.attributes.type' $LogsType + $local:Err = Set-YamlFileFieldValue "$LogzioTempDir\resources\otel\receivers\windowseventlog_system.yaml" '.receiver.windowseventlog/system/NAME.resource.type' $LogsType if ($Err.Count -ne 0) { Write-Output "error setting type to windowseventlog/system receiver: $($Err[0])" return 2 @@ -29,5 +29,5 @@ windows_run: | receiver: windowseventlog/system/NAME: channel: System - attributes: + resource: type: \ No newline at end of file