Monitoring Azure PostgreSQL flexible server
Azure Database for PostgreSQL flexible server is a fully managed database service. Instana uses Azure PostgreSQL flexible server sensor to monitor Azure PostgreSQL flexible server in Azure. Instana comprehensively monitors the Azure PostgreSQL flexible server by providing end-to-end visibility into your environment.
For more information about other supported Azure services, see Monitoring and Instrumenting Microsoft® Azure with Azure agent.
Configuring the Azure PostgreSQL flexible server sensor
To configure the Azure PostgreSQL flexible server sensor, complete the following steps:
-
Enable the Azure service subscription in Instana. Update the
<agentinstall_dir>/etc/instana/configuration.yaml
agent configuration file as shown in the following example:com.instana.plugin.azure: enabled: true subscription: "[Your-Subscription-Id]" tenant: "[Your-Tenant-Id]" principals: - id: "[Your-Service-Principal-Account-Id]" secret: "[Your-Service-Principal-Secret]"
For more information about installing the Azure agent, see Installation.
-
Enable the Azure PostgreSQL flexible server sensor, update the
<agentinstall_dir>/etc/instana/configuration.yaml
agent configuration file as shown in the following example:com.instana.plugin.azure.postgresql: enabled: true
-
Optional: Configure tags and resource groups, see Filtering services by defining tags and resource groups.
Disabling the Azure PostgreSQL flexible server sensor
To disable monitoring the Azure PostgreSQL flexible server, update the <agentinstall_dir>/etc/instana/configuration.yaml
agent configuration file as shown in the following example:
com.instana.plugin.azure.postgresql:
enabled: false
Viewing metrics
To view the metrics, complete the following steps:
- From the navigation menu in the Instana UI, select Infrastructure.
- Click a host that is monitored.
You can see a host dashboard with all the collected metrics and monitored processes.
Configuration data
Postgresql server details | Description |
---|---|
Name | Name of the PostgreSQL server |
Resource Group | Resource group of the PostgreSQL server |
Location | Location of the PostgreSQL server |
Type | Type of the resource |
State | State of the PostgreSQL server. |
Max Connections | Maximum number of concurrent connections to the database server(25-5000) |
Version | Version of PostgreSQL server |
SubscriptionID | Subscription ID of the Azure account |
Performance metrics
Azure Database for PostgreSQL flexible server is equipped with built-in performance monitoring and alerting features. All Azure metrics have a one-minute frequency, each providing 30 days of history. Two types of metrics are available, default metrics and enhanced metrics. The default metrics are available for all PostgreSQL flexible servers, but you need to enable enhanced metrics. To enable those metrics, which are not enabled by default, set the server parameter metrics.collector_database_activity
to ON. This parameter is dynamic, and it doesn't require an instance restart.
Instana monitors the following enhanced metrics:
- deadlocks
- longest_query_time_sec
- logical_replication_delay_in_bytes
Metric Name | Metric ids | Unit | Aggregation | Description |
---|---|---|---|---|
Connections | ||||
Active | active_connections | Count | Average | Total number of connections to the database server, including all connection states such as active, idle, and others, as seen in pg_stat_activity view |
Failed | connections_failed | Count | Total | Number of failed connections. |
Succeeded | connections_succeeded | Count | Total | Number of succeeded connections. |
CPU | ||||
Used | cpu_percent | Percent | Average | Percentage of CPU in use. |
Memory | ||||
Used | memory_percent | Percent | Average | Percentage of memory in use. |
Deadlocks | ||||
Count | deadlocks | Count | Total | Number of deadlocks that are detected in this database. |
Throughput | ||||
Read | read_throughput | Count | Average | Bytes read per second from the data disk during monitoring period. |
Write | write_throughput | Count | Average | Bytes written per second to the data disk during monitoring period. |
Network | ||||
Ingress | network_bytes_ingress | Bytes | Total | Amount of incoming network traffic. |
Egress | network_bytes_egress | Bytes | Total | Amount of outgoing network traffic. |
Storage | ||||
Used | storage_used | Bytes | Average | Amount of storage space that's used. The storage that's used by the service can include the database files, transaction logs, and the server logs. |
Free | storage_free | Bytes | Average | Amount of storage space that's available. |
Percent | storage_percent | Percent | Average | Percent of storage space that's used. The storage that's used by the service can include database files, transaction logs, and server logs. |
Backup Storage Used | backup_storage_used | Bytes | Average | Amount of backup storage used. This metric represents the sum of storage that's consumed by all the full backups, differential backups, and log backups that are retained based on the backup retention period that's set for the server. |
IOPS | ||||
Read | read_iops | Count | Average | Number of data disk I/O read operations per second. |
Write | write_iops | Count | Average | Number of data disk I/O write operations per second. |
Count | iops | Count | Average | Number of I/O operations to disk per second. |
Logical Replication Delay | ||||
Bytes | logical_replication_delay_in_bytes | Bytes | Maximum | Maximum lag across all logical replication slots |
Longest Query Time | ||||
Seconds | longest_query_time_sec | Seconds | Maximium | The age in seconds of the longest query that is currently running |