π 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
- Located in: π Azure PostgreSQL Database
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
RELIABILITY
PERFORMANCE
Similar Policiesβ
- Cloud Conformity
- Internal
dec-x-24bba483
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-24bba483 | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Enable
log_disconnections
onPostgreSQL 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_disconnections
helps 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 Database
forPostgreSQL servers
.- For each database, under
Settings
, clickServer parameters
.- Search for
log_disconnections
.- Ensure that
log_disconnections
is set toON
.From Azure CLIβ
Ensure
log_disconnections
value is set toON
:... see more
Remediationβ
Remediationβ
From Azure Portalβ
- From Azure Home select the Portal Menu.
- Go to
Azure Database
forPostgreSQL servers
.- For each database, under
Settings
, clickServer parameters
.- Search for
log_disconnections
.- Set
log_disconnections
to ON.- Click
Save
.From Azure CLIβ
Use the below command to update
log_disconnections
configuration:az postgres server configuration set --resource-group <resourceGroupName> --server-name <serverName> --name log_disconnections --value on
From PowerShellβ
Use the below command to update
log_disconnections
configuration:Update-AzPostgreSqlConfiguration -ResourceGroupName <ResourceGroupName> -ServerName <ServerName> -Name log_disconnections -Value on