PostgreSQL is the world’s, most popular database and it powers data for some of the world’s largest organizations. At Microsoft, our mission is to empower every person and organization on the planet to achieve more. It is therefore our firm commitment to continually bring the best of PostgreSQL and Azure innovations to a broad community of users.
Azure Postgres Flexible Server makes it easy for customers to setup, run, scale, and monitor their Postgres workloads. As is often the case with Azure’s customer-centric design, we take care of all the operational overheads to give our customers more time to focus on building their business logic. One of the key features of our service is the ability to optimize performance using metrics. We already provide over 20 database metrics such as CPU, IOPS, Memory etc. However, advanced postgres customers have also asked for more observability insights into their database and today we are happy to oblige them with the public preview of Enhanced Metrics.
Azure monitor metrics provide real-time visibility into the performance and health of your PostgreSQL database. You can use these metrics to identify and troubleshoot issues, optimize resource utilization, and improve the overall performance of your database.
After enabling the enhanced metrics, customers can get access to over twenty-seven new database, replication, session, and disk I/O related metrics. Like existing metrics, all enhanced metrics. You can configure alerts on these metrics and can also access the new metric dimensions, allowing you to split and filter the metrics data by using the available dimensions such as database name, state, etc. Customers can take advantage of these enhanced metrics to better visualize database health and correlate the performance of your Azure Database for PostgreSQL – Flexible Server databases with their application. Below is an example of enhanced metrics dashboard for one of my database instances. For a complete list of enhanced metrics, Read Monitoring Azure Postgres
You can enable enhanced metrics for an existing database instance by enabling server parameter metrics.collector_database_activity. This parameter is dynamic and does not require instance restart.
Applying Filters and Splitting on enhanced metrics
Most enhanced metrics now come with dimensions such as database name, state etc. Filtering and Splitting are available for the metrics that have dimensions. You can use them to identify outliers.
Filtering lets you choose which dimension values are included in the chart. For example, you might want to show idle connections when you chart the Sessions-by-State metric. You apply the filter on the idle on state dimension.
Splitting controls whether the chart displays separate lines for each value of a dimension or aggregates the values into a single line. For example, you can see one line for a Sessions-by-State metric across all sessions. Or you can see separate lines for each session grouped by their state. You apply splitting on the State dimension to see separate lines.
Here in this example below, we have done splitting by State dimension.
That is, it.
Overall, enhanced metrics in Azure Database for Postgres flexible server provide valuable insights into the performance and health of your database, helping you to identify and resolve issues, optimize resource utilization, and improve the overall performance of your database. To start using enhanced metrics, please refer Monitoring Azure Postgres Flexible Server.
We hope the enhanced metrics will help make your monitoring experience better, and more productive. We are always eager to get your feedback, so please reach out via email to Ask Azure DB for PostgreSQL.