Even if my JSON file is valid it is not parsed into fields. Whole json object is placed in message. My ELK stack is running on docker.
My filebeat yml is like this:
filebeat.inputs:
- type: log
enabled: true
paths:- /logs//.json
- /logs/*.json
- type: container
enabled: true
paths:- /var/lib/docker/containers//.log
processors:
-
add_docker_metadata:
host: "unix:///var/run/docker.sock" -
decode_json_fields:
fields: ["message"]
target: "json"
overwrite_keys: true
output.logstash:
enabled: true
hosts: ["logstash:5044"]
logging.json: true
logging.metrics.enabled: false
logging.level: warning
Example log:
After each Json object there is (CRLF) carriage return linefeed
{"RequestUri":"/a/b/c/AdvancedList.aspx","Url":"/a/b/c/d/e/AdvancedList.aspx","UserAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36","UrlReferrer":null,"Message":"Error occurred during search on AdvancedList\r\n Object reference not set to an instance of an object.\r\n","ExceptionType":"","Callstack":" at Publisher.UI.Web.Pages.AdvancedList.ShowArticleBasedContentTypes(SearchArgs search, IDictionary2 autoSavedArticleId) in D:\\git\\b\\c\\d\\e\\AdvancedList.aspx.cs:line 550","AdditionalExceptionData":"","Level":null,"UserId":"3276","ItemType":null,"ItemIdentifier":null,"StatusNote":null,"HttpMethod":null,"ContextEntity":"MXY","ContextCulture":"en-US-TEST","ContextTool":"ee","ContextUser":"fff","Context":null,"CallerVersion":"7.36.0.0","LoggedBy":"XXX.Publisher.UI.Web.Pages.AdvancedList.ShowArticleBasedContentTypes at offset 3911 in file:line:column D:\\git\\b\\c\\cd\\d\\AdvancedList.aspx.cs:550:17","CurrentCulture":"en-US","CurrentUICulture":"en-US","ProcessID":"001888","ThreadName":"https://abc/AdvancedList.aspx","MachineName":"sadsdasad","UserName":"WS_appPool","AppDomainName":"/LM/W3SVC/144/ROOT/publisher-6-132188908047459293","ThreadIdentity":"eee","WindowsIdentity":"ONLINE\\WS_appPool","UserIPAddress":"127.0.0.1","ProcessName":"w3wp","CommandLine":"c:\\windows\\system32\\inetsrv\\w3wp.exe -ap \"eee\" -v \"v4.0\" -l \"webengine4.dll\" -a \\\\.\\pipe\\iisipm7da4c902-3a2b-473a-96ba-411b5271be7a -h \"C:\\inetpub\\temp\\apppools\\eee\\eee.config\" -w \"\" -m 0 -t 20 -ta 0","LogVersion":"17.32.0.0"} {"RequestUri":"/a/b/c/AdvancedList.aspx","Url":"/a/b/c/d/e/AdvancedList.aspx","UserAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36","UrlReferrer":null,"Message":"Error occurred during search on AdvancedList\r\n Object reference not set to an instance of an object.\r\n","ExceptionType":"","Callstack":" at Publisher.UI.Web.Pages.AdvancedList.ShowArticleBasedContentTypes(SearchArgs search, IDictionary
2 autoSavedArticleId) in D:\git\b\c\d\e\AdvancedList.aspx.cs:line 550","AdditionalExceptionData":"","Level":null,"UserId":"3276","ItemType":null,"ItemIdentifier":null,"StatusNote":null,"HttpMethod":null,"ContextEntity":"MXY","ContextCulture":"en-US-TEST","ContextTool":"ee","ContextUser":"fff","Context":null,"CallerVersion":"7.36.0.0","LoggedBy":"XXX.Publisher.UI.Web.Pages.AdvancedList.ShowArticleBasedContentTypes at offset 3911 in file:line:column D:\git\b\c\cd\d\AdvancedList.aspx.cs:550:17","CurrentCulture":"en-US","CurrentUICulture":"en-US","ProcessID":"001888","ThreadName":"https://abc/AdvancedList.aspx","MachineName":"sadsdasad","UserName":"WS_appPool","AppDomainName":"/LM/W3SVC/144/ROOT/publisher-6-132188908047459293","ThreadIdentity":"eee","WindowsIdentity":"ONLINE\WS_appPool","UserIPAddress":"127.0.0.1","ProcessName":"w3wp","CommandLine":"c:\windows\system32\inetsrv\w3wp.exe -ap "eee" -v "v4.0" -l "webengine4.dll" -a \\.\pipe\iisipm7da4c902-3a2b-473a-96ba-411b5271be7a -h "C:\inetpub\temp\apppools\eee\eee.config" -w "" -m 0 -t 20 -ta 0","LogVersion":"17.32.0.0"}