Here is my config:
filebeat.inputs:
- type: http_endpoint
enabled: true
listen_address: 127.0.0.1
listen_port: 20000
response_code: 204
response_body: null
prefix: null
fields:
app_name: "MedService.UI"
fields_under_root: true
processors:
- timestamp:
field: Timestamp
layouts:
- '2006-01-02T15:04:05.999999999Z07:00'
- drop_fields:
fields: [Timestamp]
setup.ilm:
enabled: false
rollover_alias: "filebeat"
pattern: "{now/M{yyyy.MM}}-000001"
policy_name: "filebeat"
setup.template:
type: index
name: "filebeat"
pattern: "filebeat-*"
logging.level: warning
I'm trying to transfer log messages from a filebeat's http endpoint to Elastic instance.
The messages transfers fine, except they are all prefixed with "json" which I wanted to avoid and place them at the root level.
This is how it works with log
input:
- type: log
enabled: true
paths:
- logs\*.log
json:
keys_under_root: true
json.overwrite_keys: true
fields:
app_name: "MedService.API"
fields_under_root: true
Using this config my messages are all placed at the root level.
However, when using http_endpoint
input there is no such parameter.
When setting prefix
to "" or '' the messages just stop showing up in Kibana.
When changing prefix
to something like "logs" the messages are correctly prefixed with "logs".
When setting prefix
to something like null
or just leave it empty, then default "json" appears in messages as a prefix.
Is it possible to place my logs at the root level using http_endpoint
input?