π‘οΈ 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 Database toLogs 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 sub-optimal performance.Impactβ
Enabling this setting will enable a log of all disconnections. If this is enabled for a high traffic server, the log may grow exponentially.
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_disconnectionsvalue is set toON:... see more
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_disconnectionsto ON.- Click
Save.From Azure CLIβ
Use the below command to update
log_disconnectionsconfiguration:az postgres server configuration set --resource-group <resourceGroupName> --server-name <serverName> --name log_disconnections --value onFrom PowerShellβ
Use the below command to update
log_disconnectionsconfiguration:Update-AzPostgreSqlConfiguration -ResourceGroupName <ResourceGroupName> -ServerName <ServerName> -Name log_disconnections -Value on