Hi Andrew,
My config is
input {
file {
path => ["/usr/share/logstash/pipeline/logs/*.log"]
codec => json
sincedb_path => "/dev/null"
start_position => "beginning"
}
}
filter {
mutate {
rename => { "responsetime" => "M1" }
rename => { "SourceContext" => "M3" }
}
}
output {
file {
path => ["/usr/share/logstash/pipeline/logs_migration/"]
}
}
output is
{
"event": {
"original": "{\"Timestamp\":\"2023-02-09T17:41:54.5320239+03:00\",\"Level\":\"Information\",\"MessageTemplate\":\"Request finished in {responsetime} ms.\",\"Properties\":{\"responsetime\":4758,\"SourceContext\":\"VPOS.Application.RequestResponseLoggingMiddleware\",\"Username\":null,\"Url\":\"http://localhost:5187/api/token\",\"HttpMethod\":\"POST\",\"TraceId\":\"0HMOALF12PNG6:00000002\",\"UserIP\":\"::1\",\"UserAgent\":\"PostmanRuntime/7.30.0\",\"RequestBody\":\"{\\r\\n \\\"username\\\": \\\"testadmin\\\",\\r\\n \\\"password\\\": \\\"******\\\"\\r\\n}\",\"RequestQueryString\":\"\",\"ResponseBody\":\"{\\\"token\\\":\\\"4q23PcpOKO5YKVxzwvoTN0hQnp3GIZ328qWiIHUN2ueO2MwHa8N5RFu6P2ou3g\\\",\\\"created\\\":\\\"2023-02-09T17:41:54.510778+03:00\\\"}\",\"RequestId\":\"0HMOALF12PNG6:00000002\",\"RequestPath\":\"/api/token\",\"ConnectionId\":\"0HMOALF12PNG6\",\"ApplicationName\":\"VPOS.Auth.Api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\"}}\r"
},
"host": { "name": "de5133b1867a" },
"log": { "file": { "path": "/usr/share/logstash/pipeline/logs/logs.log" } },
"Level": "Information",
"Properties": {
"SourceContext": "",
"RequestBody": "",
"TraceId": "0HMOALF12PNG6:00000002",
"RequestQueryString": "",
"HttpMethod": "POST",
"RequestPath": "",
"Username": null,
"ResponseBody": "",
"ConnectionId": "0HMOALF12PNG6",
"ApplicationName": "VPOS.Auth.Api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"responsetime": 4758,
"UserAgent": "PostmanRuntime/7.30.0",
"Url": "",
"UserIP": "::1",
"RequestId": "0HMOALF12PNG6:00000002"
},
"@version": "1",
"Timestamp": "2023-02-09T17:41:54.5320239+03:00",
"MessageTemplate": "Request finished in {responsetime} ms.",
"@timestamp": "2023-02-13T16:56:44.582486700Z"
}