I have a JSON file by name "output.json" which has only one entry --
CI ID : 213
I am trying to read from the json file using the below logstash configuration using input file plugin . My aim is to include the content of the JSON file and append to every document entry that i receive from filebeat. The contents of the JSON file is dynamic and changes once per day.
input {
beats {
port => 5044
ssl => true
ssl_certificate => "/security/logstash.crt"
ssl_key => "/security/logstash.key"
}
file {
path => ["/etc/logstash/output.json"]
start_position => "beginning"
sincedb_path => "/dev/null"
codec => "json"
}
}
filter {
grok {
match => { "message" => "^The build ID of the run is : %{NUMBER:filteredValues}" }
}
}
Note : I have already deleted the .sincedb file and tried to execute the above configuration. But no luck.
My Question : any idea on how to read from a static JSON file and append the content of the json to every document entry into logstash ??