I queried Elasticsearch and got the following:
{
"_index" : "filebeat-2017.03.27",
"_type" : "log",
"_id" : "AVsQ0S06i5178hY1Lr4U",
"_score" : 1.0,
"_source" : {
"@timestamp" : "2017-03-27T17:29:16.356Z",
"beat" : {
"hostname" : "15f7ccc3a4c1",
"name" : "15f7ccc3a4c1",
"version" : "5.2.2"
},
"input_type" : "log",
"message" : "{\"error\":\"dial tcp 172.21.0.2:5432: getsockopt: connection refused\",\"level\":\"error\",\"msg\":\"Could not open database connection\",\"time\":\"2017-03-27T17:19:35Z\"}",
"offset" : 158,
"source" : "/mnt/log/error.log",
"type" : "log"
}
}
Could it somehow be related to Docker? I recreated all containers before starting the server and checking the logs. I suppose it doesn't matter which file endings the log files have (.json or .log)?