Skip to content

Commit 17de7cf

Browse files
committed
updates to slow query log
1 parent 22b4a83 commit 17de7cf

File tree

2 files changed

+34
-32
lines changed

2 files changed

+34
-32
lines changed

articles/mariadb/concepts-server-logs.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,15 @@ author: ajlam
55
ms.author: andrela
66
ms.service: mariadb
77
ms.topic: conceptual
8-
ms.date: 3/18/2020
8+
ms.date: 4/13/2020
99
---
1010
# Slow query logs in Azure Database for MariaDB
1111
In Azure Database for MariaDB, the slow query log is available to users. Access to the transaction log is not supported. The slow query log can be used to identify performance bottlenecks for troubleshooting.
1212

1313
For more information about the slow query log, see the MariaDB documentation for [slow query log](https://mariadb.com/kb/en/library/slow-query-log-overview/).
1414

15-
## Access slow query logs
16-
You can list and download Azure Database for MariaDB slow query logs using the Azure portal, and the Azure CLI.
17-
18-
In the Azure portal, select your Azure Database for MariaDB server. Under the **Monitoring** heading, select the **Server Logs** page.
19-
20-
For more information on Azure CLI, see [Configure and access server logs using Azure CLI](howto-configure-server-logs-cli.md).
21-
22-
Similarly, you can pipe the logs to Azure Monitor using Diagnostic Logs. See [below](concepts-server-logs.md#diagnostic-logs) for more information.
23-
24-
## Log retention
25-
Logs are available for up to seven days from their creation. If the total size of the available logs exceeds 7 GB, then the oldest files are deleted until space is available.
26-
27-
Logs are rotated every 24 hours or 7 GB, whichever comes first.
28-
2915
## Configure slow query logging
30-
By default the slow query log is disabled. To enable it, set slow_query_log to ON.
16+
By default the slow query log is disabled. To enable it, set `slow_query_log` to ON. This can be enabled using the Azure portal or Azure CLI.
3117

3218
Other parameters you can adjust include:
3319

@@ -43,6 +29,21 @@ Other parameters you can adjust include:
4329
4430
See the MariaDB [slow query log documentation](https://mariadb.com/kb/en/library/slow-query-log-overview/) for full descriptions of the slow query log parameters.
4531

32+
## Access slow query logs
33+
There are two options for accessing slow query logs in Azure Database for MariaDB: local server storage or Azure Monitor Diagnostic Logs. This is set using the `log_output` parameter.
34+
35+
For local server storage, you can list and download slow query logs using the Azure portal or the Azure CLI. In the Azure portal, navigate to your server in the Azure portal. Under the **Monitoring** heading, select the **Server Logs** page. For more information on Azure CLI, see [Configure and access server logs using Azure CLI](howto-configure-server-logs-cli.md).
36+
37+
Azure Monitor Diagnostic Logs allows you to pipe slow query logs to Azure Monitor Logs (Log Analytics), Azure Storage, or Event Hubs. See [below](concepts-server-logs.md#diagnostic-logs) for more information.
38+
39+
## Local server storage log retention
40+
When logging to the server's local storage, logs are available for up to seven days from their creation. If the total size of the available logs exceeds 7 GB, then the oldest files are deleted until space is available.
41+
42+
Logs are rotated every 24 hours or 7 GB, whichever comes first.
43+
44+
[!NOTE]
45+
> The above log retention does not apply to logs that are piped using Azure Monitor Logs. Customers can change the retention period for the data sinks being emitted to.
46+
4647
## Diagnostic logs
4748
Azure Database for MariaDB is integrated with Azure Monitor Diagnostic Logs. Once you have enabled slow query logs on your MariaDB server, you can choose to have them emitted to Azure Monitor logs, Event Hubs, or Azure Storage. To learn more about how to enable diagnostic logs, see the how to section of the [diagnostic logs documentation](../azure-monitor/platform/platform-logs-overview.md).
4849

articles/mysql/concepts-server-logs.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,15 @@ author: ajlam
55
ms.author: andrela
66
ms.service: mysql
77
ms.topic: conceptual
8-
ms.date: 01/28/2020
8+
ms.date: 4/13/2020
99
---
1010
# Slow query logs in Azure Database for MySQL
1111
In Azure Database for MySQL, the slow query log is available to users. Access to the transaction log is not supported. The slow query log can be used to identify performance bottlenecks for troubleshooting.
1212

1313
For more information about the MySQL slow query log, see the MySQL reference manual's [slow query log section](https://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html).
1414

15-
## Access slow query logs
16-
You can list and download Azure Database for MySQL slow query logs using the Azure portal, and the Azure CLI.
17-
18-
In the Azure portal, select your Azure Database for MySQL server. Under the **Monitoring** heading, select the **Server Logs** page.
19-
20-
For more information on Azure CLI, see [Configure and access slow query logs using Azure CLI](howto-configure-server-logs-in-cli.md).
21-
22-
Similarly, you can pipe the logs to Azure Monitor using Diagnostic Logs. See [below](concepts-server-logs.md#diagnostic-logs) for more information.
23-
24-
## Log retention
25-
Logs are available for up to seven days from their creation. If the total size of the available logs exceeds 7 GB, then the oldest files are deleted until space is available.
26-
27-
Logs are rotated every 24 hours or 7 GB, whichever comes first.
28-
2915
## Configure slow query logging
30-
By default the slow query log is disabled. To enable it, set slow_query_log to ON.
16+
By default the slow query log is disabled. To enable it, set `slow_query_log` to ON. This can be enabled using the Azure portal or Azure CLI.
3117

3218
Other parameters you can adjust include:
3319

@@ -43,6 +29,21 @@ Other parameters you can adjust include:
4329
4430
See the MySQL [slow query log documentation](https://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html) for full descriptions of the slow query log parameters.
4531

32+
## Access slow query logs
33+
There are two options for accessing slow query logs in Azure Database for MySQL: local server storage or Azure Monitor Diagnostic Logs. This is set using the `log_output` parameter.
34+
35+
For local server storage, you can list and download slow query logs using the Azure portal or the Azure CLI. In the Azure portal, navigate to your server in the Azure portal. Under the **Monitoring** heading, select the **Server Logs** page. For more information on Azure CLI, see [Configure and access slow query logs using Azure CLI](howto-configure-server-logs-in-cli.md).
36+
37+
Azure Monitor Diagnostic Logs allows you to pipe slow query logs to Azure Monitor Logs (Log Analytics), Azure Storage, or Event Hubs. See [below](concepts-server-logs.md#diagnostic-logs) for more information.
38+
39+
## Local server storage log retention
40+
When logging to the server's local storage, logs are available for up to seven days from their creation. If the total size of the available logs exceeds 7 GB, then the oldest files are deleted until space is available.
41+
42+
Logs are rotated every 24 hours or 7 GB, whichever comes first.
43+
44+
[!NOTE]
45+
> The above log retention does not apply to logs that are piped using Azure Monitor Logs. Customers can change the retention period for the data sinks being emitted to.
46+
4647
## Diagnostic logs
4748
Azure Database for MySQL is integrated with Azure Monitor Diagnostic Logs. Once you have enabled slow query logs on your MySQL server, you can choose to have them emitted to Azure Monitor logs, Event Hubs, or Azure Storage. To learn more about how to enable diagnostic logs, see the how to section of the [diagnostic logs documentation](../azure-monitor/platform/platform-logs-overview.md).
4849

0 commit comments

Comments
 (0)