Open NamanGajjar26 opened 2 months ago
Pinging code owners:
exporter/opensearch: @Aneurysm9 @MitchellGale @MaxKsyunz @YANG-DB
See Adding Labels via Comments if you do not have permissions to add labels yourself.
i am get this two error below how to solved this error
error opensearchexporter@v0.106.1/logger.go:36 Request failed. {"kind": "exporter", "data_type": "logs", "name": "opensearch", "path": "/_bulk", "method": "POST", "duration": 0.001234298, "reason": "net/http: HTTP/1.x transport connection broken: http: ContentLength=22616 with Body length 0"}
error exporterhelper/common.go:296 Exporting failed. Rejecting data. {"kind": "exporter", "data_type": "logs", "name": "opensearch", "error": "not retryable error: Permanent error: Permanent error: flush: net/http: HTTP/1.x transport connection broken: http: ContentLength=22616 with Body length 0\nPermanent error: Permanent error: flush: net/http: HTTP/1.x transport connection broken: http: ContentLength=22616 with Body length 0", "rejected_items": 12}
and i am config in yml like below
`config:
receivers:
filelog:
include: ["/app/log/naman/namanlog.log"]
start_at: end
operators:
- type: regex_parser
regex: '"Timestamp":"(?P<Timestamp>[^"]+)","Level":"(?P<Level>[^"]+)","MessageTemplate":"(?P<MessageTemplate>[^"]+)","TraceId":"(?P<TraceId>[^"]+)","SpanId":"(?P<SpanId>[^"]+)","Properties":{(?P<Properties>.*)}'
processors:
batch:
timeout: 60s
send_batch_max_size: 10000
extensions:
basicauth/client:
client_auth:
username: admin
password: TadhakDev01
health_check:
endpoint: ${env:MY_POD_IP}:13133
exporters:
logging:
loglevel: debug
opensearch:
logs_index: otel-index-opensearch
http:
endpoint: http://opensearch-cluster-master-headless.myopensearch.svc.cluster.local:9200
auth:
authenticator: basicauth/client
tls:
insecure: true
insecure_skip_verify: true
timeout: 60s
service:
telemetry:
logs:
level: debug
extensions:
- basicauth/client
- health_check
pipelines:
logs:
receivers: [filelog]
exporters: [opensearch]`
Component(s)
exporter/opensearch
What happened?
Description
hi there i am try to send receivers log file from this path (/app/log/naman/namanlog.log) and export this log to opensearch and make new index (demo1-index) get this log opensearch
Steps to Reproduce
Expected Result
i want to get this log message in opensearch using opentelemetry {"@timestamp":"2024-08-09T13:33:12.406Z","flb-key":"kube.custommvc.app.log.naman.namanlog.log","Timestamp":"2024-08-09T13:33:12.1972500+00:00","Level":"Error","MessageTemplate":"time_error_new2","TraceId":"b6475c2b94d380210de53197e5c482e8","SpanId":"53a55dc04afce4b5","Properties":{"Method":"errorlog","IndiaTime":"2024-08-09T19:03:12.1972334","UtcTimestamp":"2024-08-09T13:33:12.1972475Z","Timestamp":"2024-08-09T13:33:12.1972429+00:00"}}
Actual Result
there are show error in opentelemetry error error reader/reader.go:140 process: %w {"kind": "receiver", "name": "filelog", "data_type": "logs", "component": "fileconsumer", "path": "/app/log/naman/namanlog.log", "error": "failed to process the docker log: move: field log does not exist"}
Collector version
latest
Environment information
Environment
OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
Log output
Additional context
No response