-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
Description
Component(s)
receiver/filelog
What happened?
Description
The containerd operator whithin the filelog reciever fails to generate attributes on Windows hosts.
This looks to be because the regex parsing does not cater for windows file path seperator.
Steps to Reproduce
- Running on AWS EKS cluster with a windows node
- Deploy OpenTelemetryCollector CRD with below config
apiversion: opentelemetry.io/v1beta1
kind: opentelemetrycollector
metadata:
name: otel-windows
namespace: olly-system
spec:
config:
exporters:
debug:
verbosity: detailed
processors:
batch/logs:
send_batch_max_size: 5000
send_batch_size: 2500
timeout: 10s
receivers:
filelog:
include:
- c:\var\log\pods\*\*\*.log
include_file_name: false
include_file_path: true
include_file_record_number: true
operators:
- add_metadata_from_filepath: true
format: containerd
type: container
retry_on_failure:
enabled: true
initial_interval: 1s
max_elapsed_time: 10m
max_interval: 30s
start_at: beginning
storage: file_storage
service:
pipelines:
logs:
exporters:
- debug
processors:
- batch/logs
receivers:
- filelog
telemetry:
logs:
level: debug
nodeselector:
kubernetes.io/os: windowsExpected Result
Collector to parse the log and add attributes.
k8s.pod.namek8s.pod.uidk8s.container.namek8s.container.restart_countk8s.namespace.name
Actual Result
Receive error
2024-10-01T14:57:41.620+0100 error reader/reader.go:140 process: %w {"kind": "receiver", "name": "filelog", "data_type": "logs", "component": "fileconsumer", "path": "C:\\var\\log\\pods\\my-namespace_some-pod-lksd23el3_041f33f9-34ac-4b6a-8df9-68dc27f4bd27\\main\\0.log", "error": "failed to handle attribute mappings: failed to detect a valid log path"}
Collector version
v0.110.0
Environment information
Environment
OS: Windows EKS Node
OpenTelemetry Collector configuration
exporters:
debug:
verbosity: detailed
processors:
batch/logs:
send_batch_max_size: 5000
send_batch_size: 2500
timeout: 10s
receivers:
filelog:
include:
- c:\var\log\pods\*\*\*.log
include_file_name: false
include_file_path: true
include_file_record_number: true
operators:
- add_metadata_from_filepath: true
format: containerd
type: container
retry_on_failure:
enabled: true
initial_interval: 1s
max_elapsed_time: 10m
max_interval: 30s
start_at: beginning
storage: file_storage
service:
pipelines:
logs:
exporters:
- debug
processors:
- batch/logs
receivers:
- filelog
telemetry:
logs:
level: debugLog output
2024-10-01T14:57:41.620+0100 error reader/reader.go:140 process: %w {"kind": "receiver", "name": "filelog", "data_type": "logs", "component": "fileconsumer", "path": "C:\\var\\log\\pods\\my-namespace_some-pod-lksd23el3_041f33f9-34ac-4b6a-8df9-68dc27f4bd27\\main\\0.log", "error": "failed to handle attribute mappings: failed to detect a valid log path"}Additional context
No response
Reactions are currently unavailable