mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
docs: [VictoriaLogs] OTel Collector elasticsearchexporter header note (#7074)
### Describe Your Changes By default, the `elasticsearchexporter` in OTel Collector puts the log message under a field other than `_msg` (e.g., `Body`). Without specifying via an HTTP header, those logs may not be queried correctly. See also: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6785. This pull request updates the example configuration and notes for the `elasticsearchexporter`. ### Checklist The following checks are **mandatory**: - [X] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/).
This commit is contained in:
parent
91b28d0527
commit
fea4433362
1 changed files with 12 additions and 1 deletions
|
@ -56,6 +56,8 @@ exporters:
|
|||
elasticsearch:
|
||||
endpoints:
|
||||
- http://victorialogs:9428/insert/elasticsearch
|
||||
headers:
|
||||
VL-Msg-Field: "Body" # Optional.
|
||||
receivers:
|
||||
filelog:
|
||||
include: [/tmp/logs/*.log]
|
||||
|
@ -68,6 +70,15 @@ service:
|
|||
exporters: [elasticsearch]
|
||||
```
|
||||
|
||||
Please note that every ingested log entry **must** contain at least a `_msg` field with the actual log message. By default,
|
||||
the Elasticsearch exporter may place the log message in the `Body` field. In this case, you can specify the field mapping via:
|
||||
```yaml
|
||||
headers:
|
||||
VL-Msg-Field: "Body"
|
||||
```
|
||||
|
||||
VictoriaLogs also support specify `AccountID`, `ProjectID`, log timestamp and other fields via [HTTP headers](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-headers).
|
||||
|
||||
### Loki
|
||||
|
||||
```yaml
|
||||
|
|
Loading…
Reference in a new issue