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/postgresql/flexible-server/concepts-monitoring.md
+41-23Lines changed: 41 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.author: varundhawan
6
6
ms.service: postgresql
7
7
ms.subservice: flexible-server
8
8
ms.topic: conceptual
9
-
ms.date: 9/5/2023
9
+
ms.date: 9/15/2023
10
10
---
11
11
12
12
# Monitor metrics on Azure Database for PostgreSQL - Flexible Server
@@ -22,7 +22,7 @@ Azure Database for PostgreSQL provides various metrics that give insight into th
22
22
> [!NOTE]
23
23
> While metrics are stored for 93 days, you can only query (in the Metrics tile) for a maximum of 30 days' worth of data on any single chart. If you see a blank chart or your chart displays only part of metric data, verify that the difference between start and end dates in the time picker doesn't exceed the 30-day interval. After you've selected a 30-day interval, you can pan the chart to view the full retention window.
24
24
25
-
### List of metrics
25
+
### Default Metrics
26
26
27
27
The following metrics are available for a flexible server instance of Azure Database for PostgreSQL:
28
28
@@ -51,18 +51,18 @@ The following metrics are available for a flexible server instance of Azure Data
51
51
|**Write IOPS**|`write_iops`|Count |Number of data disk I/O write operations per second. |Yes |
52
52
53
53
54
-
## Enhanced metrics
54
+
###Enhanced metrics
55
55
56
56
You can use enhanced metrics for Azure Database for PostgreSQL - Flexible Server to get fine-grained monitoring and alerting on databases. You can configure alerts on the metrics.
57
57
58
58
Some enhanced metrics include a `Dimension` parameter that you can use to split and filter metrics data by using a dimension like database name or state.
59
59
60
-
###Enable enhanced metrics
60
+
#### How to enable enhanced metrics
61
61
62
62
- Most of these new metrics are *disabled* by default. A few exceptions are described in the next table.
63
63
- To enable these metrics, set the server parameter `metrics.collector_database_activity` to `ON`. This parameter is dynamic and doesn't require an instance restart.
64
64
65
-
### List of enhanced metrics
65
+
####List of enhanced metrics
66
66
67
67
You can choose from the following categories of enhanced metrics:
68
68
@@ -73,7 +73,7 @@ You can choose from the following categories of enhanced metrics:
@@ -85,7 +85,7 @@ You can choose from the following categories of enhanced metrics:
85
85
|**Oldest xmin**|`oldest_backend_xmin`|Count|The actual value of the oldest `xmin`. If `xmin` isn't increasing, it indicates that there are some long-running transactions that can potentially hold dead tuples from being removed. |Doesn't apply|No|
86
86
|**Oldest xmin Age**|`oldest_backend_xmin_age`|Count|Age in units of the oldest `xmin`. Indicates how many transactions passed since the oldest `xmin`. |Doesn't apply|No|
87
87
88
-
#### Database
88
+
#####Database
89
89
90
90
|Display name |Metric ID |Unit |Description |Dimension |Default enabled|
|**Max Physical Replication Lag**|`physical_replication_delay_in_bytes`|Bytes|Maximum lag across all asynchronous physical replication slots.|Doesn't apply|Yes |
119
119
|**Read Replica Lag**|`physical_replication_delay_in_seconds`|Seconds|Read replica lag in seconds. |Doesn't apply|Yes |
|**Disk Bandwidth Consumed Percentage**|`disk_bandwidth_consumed_percentage`|Percent|Percentage of data disk bandwidth consumed per minute.|Doesn't apply|Yes |
126
126
|**Disk IOPS Consumed Percentage**|`disk_iops_consumed_percentage`|Percent|Percentage of data disk I/Os consumed per minute. |Doesn't apply|Yes |
|**Max Connections** ^|`max_connections`|Count|Number of maximum connections. |Doesn't apply|Yes |
133
133
134
134
^ **Max Connections** represents the configured value for the `_max_connections_ server` parameter. This metric is pooled every 30 minutes.
135
135
136
-
#### Considerations for using enhanced metrics
136
+
#####Considerations for using enhanced metrics
137
137
138
138
- Enhanced metrics that use the DatabaseName dimension have a *50-database* limit.
139
139
- On the *Burstable* SKU, the limit is 10 databases for metrics that use the DatabaseName dimension.
140
140
- The DatabaseName dimension limit is applied on the object identifier (OID) column, which reflects the order of creation for the database.
141
141
- The DatabaseName in the metrics dimension is *case insensitive*. The metrics for database names that are the same except for case (for example, *contoso_database* and *Contoso_database*) will be merged and might not show accurate data.
142
142
143
-
## Autovacuum metrics
143
+
###Autovacuum metrics
144
144
145
145
Autovaccum metrics can be used to monitor and tune autovaccum performance for Azure Database for PostgreSQL - Flexible Server. Each metric is emitted at a *30-minute* interval and has up to *93 days* of retention. You can create alerts for specific metrics, and you can split and filter metrics data by using the DatabaseName dimension.
146
146
147
-
###Enable autovacuum metrics
147
+
#### How to enable autovacuum metrics
148
148
149
149
- Autovacuum metrics are disabled by default.
150
150
- To enable these metrics, set the server parameter `metrics.autovacuum_diagnostics` to `ON`.
151
151
- This parameter is dynamic, so an instance restart isn't required.
152
152
153
-
### List of autovacuum metrics
153
+
####List of autovacuum metrics
154
154
155
155
|Display name |Metric ID |Unit |Description |Dimension |Default enabled|
@@ -168,23 +168,23 @@ Autovaccum metrics can be used to monitor and tune autovaccum performance for Az
168
168
|**User Tables Vacuumed**|`tables_vacuumed_user_tables`|Count |Number of user-only tables that have been vacuumed in this database. |DatabaseName|No |
169
169
|**Vacuum Counter User Tables**|`vacuum_count_user_tables`|Count |Number of times user-only tables have been manually vacuumed in this database (not counting `VACUUM FULL`).|DatabaseName|No |
170
170
171
-
### Considerations for using autovacuum metrics
171
+
####Considerations for using autovacuum metrics
172
172
173
173
- Autovacuum metrics that use the DatabaseName dimension have a *30-database* limit.
174
174
- On the *Burstable* SKU, the limit is 10 databases for metrics that use the DatabaseName dimension.
175
175
- The DatabaseName dimension limit is applied on the OID column, which reflects the order of creation for the database.
176
176
177
-
## PgBouncer metrics
177
+
###PgBouncer metrics
178
178
179
179
You can use PgBouncer metrics to monitor the performance of the PgBouncer process, including details for active connections, idle connections, total pooled connections, and the number of connection pools. Each metric is emitted at a *30-minute* interval and has up to *93 days* of history. Customers can configure alerts on the metrics and also access the new metrics dimensions to split and filter metrics data by database name.
180
180
181
-
###Enable PgBouncer metrics
181
+
#### How to enable PgBouncer metrics
182
182
183
183
- PgBouncer metrics are disabled by default.
184
184
- For PgBouncer metrics to work, both the server parameters `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` must be enabled.
185
185
- These parameters are dynamic and don't require an instance restart.
@@ -195,13 +195,13 @@ You can use PgBouncer metrics to monitor the performance of the PgBouncer proces
195
195
|**Total pooled connections**|`total_pooled_connections`|Count|Current number of pooled connections. |DatabaseName|No |
196
196
|**Number of connection pools**|`num_pools`|Count|Total number of connection pools. |DatabaseName|No |
197
197
198
-
### Considerations for using the PgBouncer metrics
198
+
####Considerations for using the PgBouncer metrics
199
199
200
200
- PgBouncer metrics that use the DatabaseName dimension have a *30-database* limit.
201
201
- On the *Burstable* SKU, the limit is 10 databases that have the DatabaseName dimension.
202
202
- The DatabaseName dimension limit is applied to the OID column, which reflects the order of creation for the database.
203
203
204
-
## Database availability metric
204
+
###Database availability metric
205
205
206
206
Is-db-alive is an database server availability metric for Azure Postgres Flexible Server, that returns `[1 for available]` and `[0 for not-available]`. Each metric is emitted at a *1 minute* frequency, and has up to *93 days* of retention. Customers can configure alerts on the metric.
207
207
@@ -215,7 +215,7 @@ Is-db-alive is an database server availability metric for Azure Postgres Flexibl
215
215
- Customers have option to further aggregate these metrics with any desired frequency (5m, 10m, 30m etc.) to suit their alerting requirements and avoid any false positive.
216
216
- Other possible aggregations are `AVG()` and `MIN()`
217
217
218
-
## Filter and split on dimension metrics
218
+
###Filter and split on dimension metrics
219
219
220
220
In the preceding tables, some metrics have dimensions like DatabaseName or State. You can use [filtering](../../azure-monitor/essentials/metrics-charts.md#filters) and [splitting](../../azure-monitor/essentials/metrics-charts.md#apply-splitting) for the metrics that have dimensions. These features show how various metric segments (or *dimension values*) affect the overall value of the metric. You can use them to identify possible outliers.
221
221
@@ -228,10 +228,28 @@ The following example demonstrates splitting by the State dimension and filterin
228
228
229
229
For more information about setting up charts for dimensional metrics, see [Metric chart examples](../../azure-monitor/essentials/metric-chart-samples.md).
230
230
231
-
## Server logs
231
+
### Metrics visualization
232
+
233
+
There are several options to visualize Azure Monitor metrics
234
+
235
+
|Component |Description | Required training and/or configuration|
236
+
|---------|---------|--------|
237
+
|Overview page|Most Azure services have an **Overview** page in the Azure portal that includes a **Monitor** section with charts that show recent critical metrics. This information is intended for owners of individual services to quickly assess the performance of the resource. |This page is based on platform metrics that are collected automatically. No configuration is required. |
238
+
|[Metrics Explorer](essentials/metrics-getting-started.md)|You can use Metrics Explorer to interactively work with metric data and create metric alerts. You need minimal training to use Metrics Explorer, but you must be familiar with the metrics you want to analyze. |- Once data collection is configured, no other configuration is required.<br>- Platform metrics for Azure resources are automatically available.<br>- Guest metrics for virtual machines are available after an Azure Monitor agent is deployed to the virtual machine.<br>- Application metrics are available after Application Insights is configured. |
239
+
|[Grafana](https://grafana.com/grafana/dashboards/19556-azure-azure-postgresql-flexible-server-monitoring/)| You can use Grafana for visualizing and alerting on metrics. All versions of Grafana include the [Azure Monitor datasource plug-in](visualize/grafana-plugin.md) to visualize your Azure Monitor metrics and logs. | Some training is required for you to become familiar with Grafana dashboards, although you can download prebuilt [Azure PostgreSQL grafana monitoring dashboard](https://grafana.com/grafana/dashboards/19556-azure-azure-postgresql-flexible-server-monitoring/) to easily all Auzre PostgreSQL srevers in your organzation. |
240
+
241
+
242
+
## Logs
232
243
233
244
In addition to the metrics, you can use Azure Database for PostgreSQL to configure and access Azure Database for PostgreSQL standard logs. For more information, see [Logging concepts](concepts-logging.md).
234
245
246
+
### Logs visualization
247
+
248
+
|Component |Description | Required training and/or configuration|
249
+
|---------|---------|--------|
250
+
|[Log Analytics](logs/log-analytics-overview.md)|With Log Analytics, you can create log queries to interactively work with log data and create log query alerts.| Some training is required for you to become familiar with the query language, although you can use prebuilt queries for common requirements. You can also add [query packs](logs/query-packs.md) with queries that are unique to your organization. Then if you're familiar with the query language, you can build queries for others in your organization. |
251
+
252
+
235
253
## Next steps
236
254
237
255
- Learn more about how to [configure and access logs](howto-configure-and-access-logs.md).
0 commit comments