An Azure managed MySQL database service for app development and deployment.
Azure Database for MySQL Flexible Server: Dedicated diagnostic setting still sends MySqlAuditLogs to AzureDiagnostics
I am using Azure Database for MySQL Flexible Server and want to send MySqlAuditLogs and MySqlSlowLogs to resource-specific Log Analytics tables instead of the legacy AzureDiagnostics table.
I configured the diagnostic setting as follows:
az monitor diagnostic-settings create \
--name dblogs \
--resource "/subscriptions/<subscription-id>/resourceGroups/Network/providers/Microsoft.DBforMySQL/flexibleServers/db" \
--workspace "/subscriptions/<subscription-id>/resourceGroups/Network/providers/Microsoft.OperationalInsights/workspaces/logws" \
--export-to-resource-specific true \
--logs '[{"category":"MySqlSlowLogs","enabled":true},{"category":"MySqlAuditLogs","enabled":true}]'
When I check the diagnostic setting, Azure reports:
{
"destination": "Dedicated",
"logs": [
"MySqlSlowLogs",
"MySqlAuditLogs"
]
}
Specifically:
az monitor diagnostic-settings show \
--name dblogs \
--resource "/subscriptions/<subscription-id>/resourceGroups/Network/providers/Microsoft.DBforMySQL/flexibleServers/db" \
--query "{destination:logAnalyticsDestinationType,workspace:workspaceId,logs:logs[].category}" \
-o json
returns:
{
"destination": "Dedicated",
"logs": [
"MySqlSlowLogs",
"MySqlAuditLogs"
],
"workspace": ".../workspaces/logws"
}
However, new MySqlAuditLogs records are still being ingested into the AzureDiagnostics table.
For example, I can query:
AzureDiagnostics
| where Category == "MySqlAuditLogs"
| where _ResourceId contains "db"
| where TimeGenerated > ago(1h)
and receive new records.
At the same time, querying the resource-specific table:
MySqlAuditLogs
| where _ResourceId contains "db"
| where TimeGenerated > ago(1h)
returns no results.
I also noticed that Microsoft's documentation appears to have some conflicting information:
- The diagnostic setting supports
Dedicated/ resource-specific mode. - There is a
MySqlAuditLogsresource-specific table documented in Azure Monitor. - However, the Azure Database for MySQL Flexible Server supported logs documentation appears to map
MySqlAuditLogsandMySqlSlowLogstoAzureDiagnostics.
Questions
- For Azure Database for MySQL Flexible Server, are
MySqlAuditLogsandMySqlSlowLogscurrently supported in resource-specific Log Analytics tables? - If they are supported, why does setting
logAnalyticsDestinationTypetoDedicatedstill result in new records being written toAzureDiagnostics? - Is
Dedicatedcurrently ignored for these MySQL diagnostic categories? - Is there a specific API version, Azure region, MySQL Flexible Server version, or diagnostic-settings configuration required to enable the resource-specific tables?
- If resource-specific tables are not currently supported for these categories, is there an official Microsoft roadmap or timeline for supporting them?
I am specifically trying to determine whether this is expected behavior, a service limitation, or a configuration/API issue.
Thank you.