π‘οΈ Azure PostgreSQL Single Server log_connections Parameter is not set to ONπ’
- Contextual name: π‘οΈ Single Server log_connections Parameter is not set to ONπ’
- ID:
/ce/ca/azure/postgresql-database/single-server-log-connections-parameter - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY,RELIABILITY,PERFORMANCE
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- Cloud Conformity: Enable 'LOG_CONNECTIONS' Parameter for PostgreSQL Servers
- Internal:
dec-x-1518c16e
Similar Internal Rulesβ
| Rule | Policies | Flags |
|---|---|---|
| βοΈ dec-x-1518c16e | 1 |
Descriptionβ
Descriptionβ
Enable
log_connectionsonPostgreSQL Single 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_connectionshelps PostgreSQL Database to log attempted connection to the server, as well as successful completion of client authentication. Log data can be used to identify, troubleshoot, and repair configuration errors and suboptimal performance.Auditβ
From Azure Portalβ
- Login to Azure Portal using https://portal.azure.com.
- Go to
Azure Database for PostgreSQL servers.- For each database, under
Settings, clickServer parameters.- In the filter bar, type
log_connections.- Ensure that
log_connectionsis set toON.From Azure CLIβ
Ensure the below command returns a
ValueofON:az postgres server configuration show --resource-group <resourceGroupName> --server-name <serverName> --name log_connections
... [see more](description.md)
Remediationβ
Remediationβ
From Azure Portalβ
- Login to Azure Portal using https://portal.azure.com.
- Go to
Azure Database for PostgreSQL servers.- For each database, under
Settings, clickServer parameters.- In the filter bar, type
log_connections.- Set
log_connectionstoON.- Click
Save.From Azure CLIβ
Use the below command to update
log_connectionsconfiguration:az postgres server configuration set --resource-group <resourceGroupName> --server-name <serverName> --name log_connections --value onFrom PowerShellβ
Use the below command to update
log_connectionsconfiguration:Update-AzPostgreSqlConfiguration -ResourceGroupName <ResourceGroupName> -ServerName <ServerName> -Name log_connections -Value on