π‘οΈ Azure PostgreSQL Single Server log_disconnections Parameter is not set to ONπ’
- Contextual name: π‘οΈ Single Server log_disconnections Parameter is not set to ONπ’
- ID:
/ce/ca/azure/postgresql-database/single-server-log-disconnections-parameter - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
RELIABILITY,PERFORMANCE
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- Cloud Conformity: Enable 'LOG_DISCONNECTIONS' Parameter for PostgreSQL Servers
- Internal:
dec-x-24bba483
Similar Internal Rulesβ
| Rule | Policies | Flags |
|---|---|---|
| βοΈ dec-x-24bba483 | 1 |
Descriptionβ
Descriptionβ
Enable
log_disconnectionsonPostgreSQL Servers.NOTE: This recommendation currently only applies to Single Server, not Flexible Server. See additional information below for details about the planned retirement of Azure PostgreSQL Single Server.
Rationaleβ
Enabling
log_disconnectionshelps PostgreSQL log the end of a session, including duration, which in turn generates query and error logs. Query and error logs can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance.Impactβ
Enabling this setting logs all disconnections. If this is enabled for a high-traffic server, the log may grow quickly.
Auditβ
From Azure Portalβ
- From Azure Home, select the Portal Menu.
- Go to
Azure DatabaseforPostgreSQL servers.- For each database, under
Settings, clickServer parameters.- Search for
log_disconnections.- Ensure that
log_disconnectionsis set toON.From Azure CLIβ
Ensure
log_disconnectionsis set toON:az postgres server configuration show \
... [see more](description.md)
Remediationβ
Remediationβ
From Azure Portalβ
- From Azure Home, select the Portal Menu.
- Go to
Azure DatabaseforPostgreSQL servers.- For each database, under
Settings, clickServer parameters.- Search for
log_disconnections.- Set
log_disconnectionstoON.- Click
Save.From Azure CLIβ
Use the following command to update
log_disconnections:az postgres server configuration set \
--resource-group {{resource-group-name}} \
--server-name {{server-name}} \
--name log_disconnections \
--value onFrom PowerShellβ
Use the following command to update
log_disconnections:Update-AzPostgreSqlConfiguration `
-ResourceGroupName {{resource-group-name}} `
-ServerName {{server-name}} `
-Name log_disconnections `
-Value on