Skip to main content
Sumo Logic

Collect Logs for the MySQL App

Before you can install the Sumo Logic app for MySQL, make sure that the Sources you are using to collect logs are configured correctly.

MySQL Slow Query logs

MySQL Slow Query logs are multi-line logs, so you must edit the Source to enable Detect messages spanning multiple lines and define the Boundary Regex for slow queries.

To edit the Source:

  1. Go to Manage > Collection.
  2. Select the Source you are using for the MySQL app, and click Edit.
  3. Under Advanced, in the Enable Multiline Processing dialog, select the check box Detect messages spanning multiple lines.
  4. Select the Boundary Regex radio button, and enter the following expression:
    ^#\sTime:\s+\d{6}\s+\d{1,2}:\d{1,2}:\d{1,2}.*
  5. Click Save.

mysql_app_slow_query_source_550x140.png

MySQL Error logs

MySQL Error logs are single line logs. You'll need to edit the Source to define the Boundary Regex for error logs.

To edit the Source:

  1. Go to Manage > Collection.
  2. Select the Source you are using for the MySQL app, and click Edit.
  3. Under Advanced, in the Enable Multiline Processing dialog, select the check box Detect messages spanning multiple lines.
  4. Select the Boundary Regex radio button, and enter the following expression:
    ^\d{6}\s+\d{1,2}:\d{1,2}:\d{1,2}.*
  5. Click Save.

mysql_app_error_source_550x137.png