You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/mariadb/concepts-audit-logs.md
+54-25Lines changed: 54 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: ajlam
5
5
ms.author: andrela
6
6
ms.service: mariadb
7
7
ms.topic: conceptual
8
-
ms.date: 3/18/2020
8
+
ms.date: 3/19/2020
9
9
---
10
10
11
11
# Audit Logs in Azure Database for MariaDB
@@ -101,30 +101,59 @@ Schema below applies to GENERAL, DML_SELECT, DML_NONSELECT, DML, DDL, DCL, and A
101
101
|`sql_text_s`| Full query text |
102
102
|`\_ResourceId`| Resource URI |
103
103
104
-
### Table access
105
-
106
-
|**Property**|**Description**|
107
-
|---|---|
108
-
|`TenantId`| Your tenant ID |
109
-
|`SourceSystem`|`Azure`|
110
-
|`TimeGenerated [UTC]`| Time stamp when the log was recorded in UTC |
111
-
|`Type`| Type of the log. Always `AzureDiagnostics`|
112
-
|`SubscriptionId`| GUID for the subscription that the server belongs to |
113
-
|`ResourceGroup`| Name of the resource group the server belongs to |
114
-
|`ResourceProvider`| Name of the resource provider. Always `MICROSOFT.DBFORMARIADB`|
115
-
|`ResourceType`|`Servers`|
116
-
|`ResourceId`| Resource URI |
117
-
|`Resource`| Name of the server |
118
-
|`Category`|`MySqlAuditLogs`|
119
-
|`OperationName`|`LogEvent`|
120
-
|`LogicalServerName_s`| Name of the server |
121
-
|`event_class_s`|`table_access_log`|
122
-
|`event_subclass_s`|`READ`, `INSERT`, `UPDATE`, or `DELETE`|
123
-
|`connection_id_d`| Unique connection ID generated by MariaDB |
124
-
|`db_s`| Name of database accessed |
125
-
|`table_s`| Name of table accessed |
126
-
|`sql_text_s`| Full query text |
127
-
|`\_ResourceId`| Resource URI |
104
+
## Analyze logs in Azure Monitor Logs
105
+
106
+
Once your audit logs are piped to Azure Monitor Logs through Diagnostic Logs, you can perform further analysis of your audited events. Below are some sample queries to help you get started. Make sure to update the below with your server name.
107
+
108
+
- List GENERAL events on a particular server
109
+
110
+
```kusto
111
+
AzureDiagnostics
112
+
| where LogicalServerName_s == '<your server name>'
113
+
| where Category == 'MySqlAuditLogs' and event_class_s == "general_log"
Copy file name to clipboardExpand all lines: articles/mysql/concepts-audit-logs.md
+58-1Lines changed: 58 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: ajlam
5
5
ms.author: andrela
6
6
ms.service: mysql
7
7
ms.topic: conceptual
8
-
ms.date: 3/18/2020
8
+
ms.date: 3/19/2020
9
9
---
10
10
11
11
# Audit Logs in Azure Database for MySQL
@@ -108,6 +108,9 @@ Schema below applies to GENERAL, DML_SELECT, DML_NONSELECT, DML, DDL, DCL, and A
108
108
109
109
### Table access
110
110
111
+
> [!NOTE]
112
+
> Table access logs are only output for MySQL 5.7.
113
+
111
114
|**Property**|**Description**|
112
115
|---|---|
113
116
|`TenantId`| Your tenant ID |
@@ -131,6 +134,60 @@ Schema below applies to GENERAL, DML_SELECT, DML_NONSELECT, DML, DDL, DCL, and A
131
134
|`sql_text_s`| Full query text |
132
135
|`\_ResourceId`| Resource URI |
133
136
137
+
## Analyze logs in Azure Monitor Logs
138
+
139
+
Once your audit logs are piped to Azure Monitor Logs through Diagnostic Logs, you can perform further analysis of your audited events. Below are some sample queries to help you get started. Make sure to update the below with your server name.
140
+
141
+
- List GENERAL events on a particular server
142
+
143
+
```kusto
144
+
AzureDiagnostics
145
+
| where LogicalServerName_s == '<your server name>'
146
+
| where Category == 'MySqlAuditLogs' and event_class_s == "general_log"
0 commit comments