Skip to content

Commit 8cae080

Browse files
author
Sudheesh Narayanaswamy
committed
Server Logs
1 parent 8be98c3 commit 8cae080

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed

articles/mysql/flexible-server/concepts-monitoring.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In this article, you will learn about the various metrics available and Server l
2020
> [!NOTE]
2121
> This article contains references to the term *slave*, a term that Microsoft no longer uses. When the term is removed from the software, we'll remove it from this article.
2222
23-
# Metrics
23+
## Metrics
2424

2525
Metrics are numerical values that describe some aspect of the resources of your server at a particular time. Monitoring your server's resources helps you troubleshoot and optimize your workload by allowing you to monitor what matters the most to you. Monitoring the right metrics helps you keep the performance, reliability, and availability of your server and applications.
2626

@@ -50,7 +50,7 @@ These metrics are available for Azure Database for MySQL:
5050
|Queries|queries|Count|Total number of queries executed per minute on your server. Total count of queries per minute on your server from your database workload and Azure MySQL processes.|
5151

5252

53-
# Server logs
53+
## Server logs
5454

5555
In Azure Database for MySQL Server – Flexible Server, users can configure and download server logs to assist with troubleshooting efforts. With this feature enabled, a flexible server starts capturing events of the selected log type and writes them to a file. You can then use the Azure portal and Azure CLI to download the files to work with them.
5656
The server logs feature is disabled by default. For information about how to enable server logs, see [How to enable and download server logs for Azure Database for MySQL - Flexible Server](./how-to-server-logs-portal.md)

articles/mysql/flexible-server/how-to-server-logs-cli.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
---
2+
title: 'Monitoring - List and Download Server logs using Azure CLI'
3+
description: This article describes how to download and list server logs using Azure CLI.
4+
ms.service: mysql
5+
ms.subservice: flexible-server
6+
ms.topic: conceptual
7+
author: code-sidd
8+
ms.author: sisawant
9+
ms.date: 08/05/2022
10+
---
111
# List and Download Server logs using Azure CLI
212

313
[[!INCLUDE[applies-to-mysql-flexible-server](../includes/applies-to-mysql-flexible-server.md)]
@@ -8,7 +18,7 @@ This article shows you how to list and download server flexible server using Azu
818

919
This article requires that you're running the Azure CLI version 2.39.0 or later locally. To see the version installed, run the `az --version` command. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
1020

11-
You'll need to sign-in to your account using the [az login](/cli/azure/reference-index#az-login) command. Note the **id** property, which refers to **Subscription ID** for your Azure account.
21+
You'll need to sign-in to your account using the [az sign-in](/cli/azure/reference-index#az-login) command. Note the **id** property, which refers to **Subscription ID** for your Azure account.
1222

1323
```azurecli-interactive
1424
az login
@@ -20,9 +30,9 @@ Select the specific subscription under your account using [az account set](/cli/
2030
az account set --subscription <subscription id>
2131
```
2232

23-
# List Server logs using Azure CLI
33+
## List Server logs using Azure CLI
2434

25-
Once you are configured the prerequisites and connected to your required subscription.
35+
Once you're configured the prerequisites and connected to your required subscription.
2636
You can list the server logs from your flexible server by below command.
2737

2838

@@ -41,20 +51,20 @@ LastModifiedTime | Name | ResourceGroup | SizeInKb | TypePropertiesType | Url
4151

4252

4353
Above list shows LastModifiedTime, Name, ResourceGroup, SizeInKb and Download Url of the Server Logs available.
44-
Default LastModifiedTime is set to 72 hours, for listing files older than 72 hours, use flag *--file-last-written <hours>*
54+
Default LastModifiedTime is set to 72 hours, for listing files older than 72 hours, use flag `--file-last-written <Time:HH>`
4555

4656
```azurecli
4757
az mysql flexible-server server-logs list --resource-group <myresourcegroup> --server-name <serverlogdemo> --out table --file-last-written <144>
4858
```
4959

50-
# Downloading Server logs using Azure CLI
60+
## Downloading Server logs using Azure CLI
5161

5262
Below command will download the mentioned server logs to your current directory.
5363

5464
```azurecli
5565
az mysql flexible-server server-logs download --resource-group <myresourcegroup> --server-name <serverlogdemo> --name <mysql-slow-serverlogdemo-2022073111.log>
5666
```
5767

58-
# Next Steps
68+
## Next Steps
5969
- To enable and disable Server logs from portal, click [here.](./how-to-server-logs-portal.md)
6070
- Learn more about [Configure slow logs using Azure CLI](./tutorial-query-performance-insights.md#configure-slow-query-logs-by-using-the-azure-cli)

articles/mysql/flexible-server/how-to-server-logs-portal.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
---
2+
title: 'How to enable and download server logs for Azure Database for MySQL - Flexible Server'
3+
description: This article describes how to download and list server logs using Azure Portal.
4+
ms.service: mysql
5+
ms.subservice: flexible-server
6+
ms.topic: conceptual
7+
author: code-sidd
8+
ms.author: sisawant
9+
ms.date: 08/05/2022
10+
---
111
# How to enable and download server logs for Azure Database for MySQL - Flexible Server
212

313
[!INCLUDE[applies-to-mysql-flexible-server](../includes/applies-to-mysql-flexible-server.md)]
@@ -15,7 +25,7 @@ In this tutorial, you’ll learn how to:
1525

1626
To complete this tutorial, you an existing Azure Database for MySQL flexible server. If you need to create a new server, see [Create an Azure Database for MySQL flexible server](./quickstart-create-server-portal.md).
1727

18-
# Enable Server logs
28+
## Enable Server logs
1929

2030
To enable the server logs feature, perform the following steps.
2131

@@ -40,7 +50,7 @@ To enable the server logs feature, perform the following steps.
4050
To configure slow_logs on your Azure Database for MySQL flexible server, see [Query Performance Insight.](./tutorial-query-performance-insights.md)
4151

4252

43-
# Download Server logs
53+
## Download Server logs
4454

4555
To download server logs, perform the following steps.
4656
> [!Note]
@@ -59,7 +69,7 @@ To download server logs, perform the following steps.
5969
:::image type="content" source="./media/how-to-server-logs-portal/6-how-to-serverlog.png" alt-text="Server Logs - Download":::
6070

6171

62-
# Disable Server Logs
72+
## Disable Server Logs
6373

6474
1. From your Azure portal, select Server logs from Monitoring server blade.
6575

0 commit comments

Comments
 (0)