π 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
- Located in: π Azure PostgreSQL Database
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
RELIABILITY
PERFORMANCE
Similar Policiesβ
- Cloud Conformity
- Internal
dec-x-1518c16e
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-1518c16e | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Enable
log_connections
onPostgreSQL 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_connections
helps 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_connections
is set toON
.From Azure CLIβ
Ensure the below command returns a
Value
ofON
: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_connections
toON
.- Click
Save
.From Azure CLIβ
Use the below command to update
log_connections
configuration:az postgres server configuration set --resource-group <resourceGroupName> --server-name <serverName> --name log_connections --value on
From PowerShellβ
Use the below command to update
log_connections
configuration:Update-AzPostgreSqlConfiguration -ResourceGroupName <ResourceGroupName> -ServerName <ServerName> -Name log_connections -Value on