Hi, I am having an issue parsing http_json data with Filebeat.
In the logs I can see the events come through fine.
2020-09-29T18:16:19.606+1000 DEBUG [processors] processing/processors.go:187 Publish event: {
"@timestamp": "2020-09-29T08:16:19.599Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "7.9.1"
},
"message": {
"data": {
"Event1019": {
"Time": "2020-09-29 09:10:46",
"Username": "<username>",
"Action": "Failed Login Attempt",
"Data": "",
"IP_Address": "<ip_address>"
},
But later on in the logs I get an error message:
> 2020-09-29T18:16:21.242+1000 WARN [elasticsearch] elasticsearch/client.go:407 Cannot index event publisher.Event{Content:beat.Event{Timestamp:time.Time{wall:0x23bd1e38, ext:63736964179, loc:(*time.Location)(nil)}, Meta:null, Fields:{"agen
t":{"ephemeral_id":"f6d2cdda-3295-49c6-ba0f-b96e7eadc9b7"
<Wall of text which is my json request>
status=OK}'","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:99"}}
My json input looks something like
- type: httpjson
url: redacted
interval: 60m
http_method: POST
http_request_body:
{
"cid":redacted,
"provhash":"redacted",
"cmd":"reporting",
"format": "siem"
}
fields_under_root: true
processors
- decode_json_fields:
fields: ["message"]
overwrite_keys: true
document_id: message
So I know the connection is working and I know it can see the data properly, but why cant it parse it into Elasticsearch correctly
Thanks