Hello,
I have Filebeat 6.5.0, setup with the following filebeat.yml
> filebeat.inputs:
> - type: log
> enabled: true
> paths:
> - "C:/logs/info/*registry2json.json"
> scan_frequency: 10s
> json.keys_under_root: true
> json.add_error_key: true
> json.messsage_key: message
> tags: registry_json
> # close_inactive: 1m
> clean_removed: true
>
> - type: log
> enabled: true
> paths:
> - "C:/logs/info/lexmark_printer.json"
> scan_frequency: 10s
> json.keys_under_root: true
> json.add_error_key: true
> json.messsage_key: printerList
> tags: dev-lexmark-printer
> # close_inactive: 1m
> close_eof: true
> close_removed: true
>
> - type: log
> enabled: true
> paths:
> - "C:/logs/info/btr.json"
> scan_frequency: 1m
> json.keys_under_root: true
> # json.add_error_key: true
> # json.messsage_key: message
> tags: dev-btr
> # close_inactive: 1m
> close_removed: true
>
> - type: log
> enabled: true
> paths:
> - "C:/logs/info/TOAST.json"
> scan_frequency: 10m
> json.keys_under_root: true
> json.add_error_key: true
> json.messsage_key: message
> tags: dev-toast
> # close_inactive: 1m
> # close_eof: true
> close_removed: true
> #----------------------------- Logstash output
> when:
> contains:
> tags: registry_json
> output.logstash:
> hosts: "logstash:5044"
> ssl.enabled: true
> ssl.verification_mode: full
> ssl.certificate: "certfilehere.crt"
> ssl.key: "certfilehere.key"
>
> when:
> contains:
> tags: dev-lexmark-printer
> logstash.output:
> hosts: "logstash:5040"
> ssl.enabled: true
> ssl.verification_mode: full
> ssl.certificate: "certfilehere.crt"
> ssl.key: "certfilehere.key"
>
> when:
> contains:
> tags: dev-btr
> logstash.output:
> hosts: "logstash:5041"
> ssl.enabled: true
> ssl.verification_mode: full
> ssl.certificate: "certfilehere.crt"
> ssl.key: "certfilehere.key"
>
> when:
> contains:
> tags: dev-toast
> logstash.output:
> hosts: "logstash:5042"
> ssl.enabled: true
> ssl.verification_mode: full
> ssl.certificate: "certfilehere.crt"
> ssl.key: "certfilehere.key"
For all the files, except for the registry2json.json, I am getting the following errors:
ERROR json/json.go:51 Error decoding JSON: json: cannot unmarshal string into Go value of type map[string]interface {}
This is happening to all lines in the the files. I have verified that the json files are formated correctly.
What am I setting incorrectly? Any help would be greatly appreciated.