Monitoring in Azure Database for MySQL
APPLIES TO: Azure Database for MySQL - Single Server
Azure Database for MySQL single server is on the retirement path. We strongly recommend that you upgrade to Azure Database for MySQL flexible server. For more information about migrating to Azure Database for MySQL flexible server, see What's happening to Azure Database for MySQL Single Server?
Monitoring data about your servers helps you troubleshoot and optimize for your workload. Azure Database for MySQL provides various metrics that give insight into the behavior of your server.
All Azure metrics have a one-minute frequency, and each metric provides 30 days of history. You can configure alerts on the metrics. For step by step guidance, see How to set up alerts. Other tasks include setting up automated actions, performing advanced analytics, and archiving history. For more information, see the Azure Metrics Overview.
List of metrics
These metrics are available for Azure Database for MySQL:
|Metric Display Name
|The percentage of CPU in use.
|The percentage of memory in use.
|The percentage of IO in use. (Not applicable for Basic tier servers)
|The percentage of storage used out of the server's maximum.
|The amount of storage in use. The storage used by the service may include the database files, transaction logs, and the server logs.
|Server Log storage percent
|The percentage of server log storage used out of the server's maximum server log storage.
|Server Log storage used
|The amount of server log storage in use.
|Server Log storage limit
|The maximum server log storage for this server.
|The maximum storage for this server.
|The number of active connections to the server.
|The number of failed connections to the server.
|Replication lag in seconds
|The number of seconds the replica server is lagging against the source server. (Not applicable for Basic tier servers)
|Network Out across active connections.
|Network In across active connections.
|Backup Storage Used
|The amount of backup storage used. This metric represents the sum of storage consumed by all the full database backups, differential backups, and log backups retained based on the backup retention period set for the server. The frequency of the backups is service managed and explained in the concepts article. For geo-redundant storage, backup storage usage is twice that of the locally redundant storage.
You can enable slow query and audit logging on your server. These logs are also available through Azure Diagnostic Logs in Azure Monitor logs, Event Hubs, and Storage Account. To learn more about logging, visit the audit logs and slow query logs articles.
Query Store is a feature that keeps track of query performance over time including query runtime statistics and wait events. The feature persists query runtime performance information in the mysql schema. You can control the collection and storage of data via various configuration knobs.
Query Performance Insight
Query Performance Insight works in conjunction with Query Store to provide visualizations accessible from the Azure portal. These charts enable you to identify key queries that impact performance. Query Performance Insight is accessible in the Intelligent Performance section of your Azure Database for MySQL server's portal page.
The Performance Recommendations feature identifies opportunities to improve workload performance. Performance Recommendations provides you with recommendations for creating new indexes that have the potential to improve the performance of your workloads. To produce index recommendations, the feature takes into consideration various database characteristics, including its schema and the workload as reported by Query Store. After implementing any performance recommendation, customers should test performance to evaluate the impact of those changes.
Planned maintenance notification
Planned maintenance notifications allow you to receive alerts for upcoming planned maintenance to your Azure Database for MySQL. These notifications are integrated with Service Health's planned maintenance and allow you to view all scheduled maintenance for your subscriptions in one place. It also helps to scale the notification to the right audiences for different resource groups, as you may have different contacts responsible for different resources. You will receive the notification about the upcoming maintenance 72 hours before the event.
Learn more about how to set up notifications in the planned maintenance notifications document.
- See How to set up alerts for guidance on creating an alert on a metric.
- For more information on how to access and export metrics using the Azure portal, REST API, or CLI, see the Azure Metrics Overview.
- Read our blog on best practices for monitoring your server.
- Learn more about planned maintenance notifications in Azure Database for MySQL - Single Server