Hello,
I'm currently trying to get our Filebeat to recognize proper rails logging messages, and I'm using the following configuration for the multiline part:
multiline:
pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}'
negate => false
match => "after"
I know that every line from the Rails logger is prefixed with the timestamp: 2016-07-27T12:00:12.029 6268
for example. So the pattern matches these.
However I'm trying to get EVERY line that comes after this to be appended to the first match, unless a new timestamp is detected.
an Entry example:
2016-07-27T12:00:13.485 6268 [DEBUG] <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsp="http://www.dnb.com/DNB_WebServices/Providers/GetNotifications_V5/wsp_GetNotifications_V5" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Body>
<wsp:ws_GetNotifications>
<getNotificationsRequest>
<UserId>***FILTERED***</UserId>
<Password>***FILTERED***</Password>
<getNotificationsRequestData>
<Product_Name>Enterprise Management</Product_Name>
<Notification_Level>Level 2</Notification_Level>
<Detection_Date_From>2016-07-27T09:00:12+02:00</Detection_Date_From>
<Detection_Date_To>2016-07-27T12:00:12+02:00</Detection_Date_To>
</getNotificationsRequestData>
</getNotificationsRequest>
</wsp:ws_GetNotifications>
</soapenv:Body>
</soapenv:Envelope>
But I'm still getting the XML as single lines inside Kibana, am I missing something in the multiline config?
Something else I found in my log files:
2016-08-08T09:52:42.707 1676 [INFO] Started GET "/" for 82.135.30.177 at 2016-08-08 09:52:42 +0200
2016-08-08T09:52:42.707 1676 [INFO] Processing by DashboardsController#show as HTML
2016-08-08T09:52:42.718 1676 [INFO] Redirected to https://playground.riskmethods.net/users/login
2016-08-08T09:52:42.718 1676 [INFO] Completed 302 Found in 11ms (ActiveRecord: 0.0ms)
2016-08-08T09:52:42.754 1685 [INFO] Started GET "/users/login" for 82.135.30.177 at 2016-08-08 09:52:42 +0200
2016-08-08T09:52:42.755 1685 [INFO] Processing by SessionsController#new as HTML
2016-08-08T09:52:42.762 1685 [INFO] Rendered admins/shared/_links.erb (1.0ms)
2016-08-08T09:52:42.764 1685 [INFO] Rendered shared/_csm_contact.html.erb (0.7ms)
2016-08-08T09:52:42.764 1685 [INFO] Rendered users/sessions/new.html.erb within layouts/general (6.3ms)
2016-08-08T09:52:42.771 1685 [INFO] Rendered layouts/application.html.erb (6.1ms)
2016-08-08T09:52:42.789 1685 [INFO] Completed 200 OK in 34ms (Views: 14.7ms | ActiveRecord: 13.7ms)
Why is it concatinating all those in a single message?