Using JSON with LogStash

Try removing the json codec and adding a json filter:

input {
  file {
    type => "json"
    path => "/logs/mylogs.log"
  }
}
filter{
    json{
        source => "message"
    }
}
output {
  file {
    path => "/logs/out.log"
  }
}

You do not need the json codec because you do not want decode the source JSON but you want filter the input to get the JSON data in the @message field only.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)