I have some event log files that are written in json, but they are wrapped in quotes.
Filebeats is dumping errors like this:
2017/08/01 18:37:12.103066 json.go:34: ERR Error decoding JSON: json: cannot unmarshal string into Go value of type map[string]interface {}
Input log example:
"{""System"":{""EventId"":""4634"",""Version"":""0"",""Channel"":""Security"",""ProviderName"":""Microsoft-Windows-Security-Auditing"",""Computer"":""hostname"",""EventRecordID"":""10204146"",""Keywords"":""Audit Success"",""Level"":""Log Always"",""Opcode"":""Info"",""Task"":""Logoff"",""ProcessID"":""848"",""ThreadID"":""27680"",""TimeCreated"":""1501611253559"",""UserId"":""""},""EventData"":{""TargetUserSid"":""dom\\\\hostb"",""TargetUserName"":""hostb"",""TargetDomainName"":""dob"",""TargetLogonId"":""0xed1a8f2"",""LogonType"":""3""}}"
Notice the multiple double quotes and the whole json message also wrapped in double quotes.
I need a way within filebeats to strip off the quotes or search and replace (sed) before the json processor. Or as an alternative, can I just ship the event like this to logstash and mutate the message field and then do a json extraction?