Hello Everyone I am getting the below error when i...
# support
Hello Everyone I am getting the below error when i transfer the file logs on signoz.. Kindly suggest otelcol-contrib[24020]: 2024-02-07T104115.587+0530 error helper/transformer.go:98 Failed to process entry Feb 07 104115 ast002 otelcol-contrib[24020]: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper.(*TransformerOperator).HandleEntryError Feb 07 104115 ast002 otelcol-contrib[24020]: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza@v0.88.0/operator/helper/transformer.go:98 Below is my config,yaml file receivers: filelog: include: [ "/var/log/newcrm/el-2024-01-12.log" ] start_at: beginning include_file_path: true include_file_name: false poll_interval: 200ms operators: - type: regex_parser regex: '^.(?Pbody{.})' output: parsedata - type: json_parser id: parsedata parse_from: attributes.body - type: move from: attributes["body"] to: body - type: time_parser parse_from: attributes.time layout: '2006-01-02T150405Z07:00' layout_type: gotime processors: batch: send_batch_size: 10000 send_batch_max_size: 11000 timeout: 10s exporters: otlp/log: endpoint: http://slog001.echl.in:4317 tls: insecure: true service: pipelines: logs: receivers: [filelog] processors: [batch] exporters: [otlp/log]
There is something wrong with the log lines that are getting parsed according to the processor you have defined. These errors might also occur when a non json line occurs in the parser. For that you can use
conditions in the operators. ex:- https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/json_parser.md#parse-the-body[…]-with-brackets
also would recommend you past the errors properly so that it’s easier to help. something like this
Copy code