audit_log json is not escaping characters properly

Bug #1548746 reported by Alle
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
New
Undecided
Unassigned

Bug Description

Hello,

On logstash reading the audit_log, I receive this error message with some audit_log entries:

{:timestamp=>"2016-02-22T06:37:55.645000+0000", :message=>"JSON parse failure. Falling back to plain-text", :error=>#<LogStash::Json::ParserError: Illegal unquoted character ((CTRL-CHAR, code 9)): has to be escaped using backslash to be included in string value
 at [Source: [B@53033860; line: 1, column: 344]>, :data=>"{\"audit_record\":{\"name\":\"Query\",\"record\":\"289492725_2016-02-17T11:18:32\",\"timestamp\":\"2016-02-22T06:37:54 UTC\",\"command_class\":\"insert\",\"connection_id\":\"97602\",\"status\":0,\"sqltext\":\"INSERT INTO XXXXX (ID, MESSAGE_ID, SERVER_ID, RECEIVED_DATE, STATUS, CONNECTOR_NAME, SEND_ATTEMPTS, SEND_DATE, RESPONSE_DATE, ERROR_CODE, CHAIN_ID, ORDER_ID)\\n\t\tVALUES (0, 742570, 'f8d013f6-1a85-41ea-a54d-79a216a62141', '2016-02-22 06:37:54.691', 'R', 'Source', 0, null, null, 0, 0, 0)\",\"user\":\"user[user] @ host.com\",\"host\":\"host.com\",\"os_user\":\"\",\"ip\":\"10.0.1.203\"}}", :level=>:error}

This is running on mysql 5.7.7 and the latest audit_log plugin.

mysqld Ver 5.7.11 for Linux on x86_64 (MySQL Community Server (GPL))
Linux db5 3.13.0-76-generic #120-Ubuntu SMP Mon Jan 18 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Regards
Alessandro

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.