-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Description
Component(s)
No response
Describe the issue you're reporting
hello
i am using opensearch and opentelemetry-collector-contrib filelog to send json log to opensearch
json logs like this
` {"timestamp":"2024-12-12T10:23:30.456Z","level":"INFO","message":"User logged in successfully1.","userId":101,"service":"Authentication"}
{"timestamp":"2024-12-12T10:24:20.755Z","level":"INFO","message":"User logged in successfully2.","userId":101,"service":"Authentication"}
{"timestamp":"2024-12-12T10:25:13.212Z","level":"INFO","message":"User logged in successfully3.","userId":101,"service":"Authentication"}
{"timestamp":"2024-12-12T10:26:33.333Z","level":"INFO","message":"User logged in successfully4.","userId":101,"service":"Authentication"}
{"timestamp":"2024-12-12T10:27:01.342Z","level":"INFO","message":"User logged in successfully5.","userId":101,"service":"Authentication"}
`
opentelemtry in receiver configure like this
`receivers:
filelog:
include:
- /var/log/naman-log/mylog.log
start_at: beginning
operators:
- type: json_parser
timestamp:
parse_from: attributes.timestamp
layout: '%Y-%m-%d %H:%M:%S.%LZ'
--- exporters ---
exporters:
opensearch/log:
logs_index: test-otel-log
http:
endpoint: https://opensearch-cluster-master.newopensearch.svc.cluster.local:9200/
auth:
authenticator: basicauth/client
tls:
insecure: false
insecure_skip_verify: true
timeout: 2m
retry_on_failure:
enabled: true
--- service ---
service:
telemetry:
metrics:
address: ${env:MY_POD_IP}:8888
extensions:
- basicauth/client
- health_check
pipelines:
logs:
receivers: [filelog]
processors: []
exporters: [opensearch/log]
`
there are log get in test-otel-log but not show in log Event Explorer not show how to solved this problem