Ensure that the "log_disconnections" server parameter is enabled for all PostgreSQL database servers provisioned in your Microsoft Azure cloud account. The "log_disconnections" parameter enables the logging of session termination. The log output provides information similar to the one generated by the "log_connections" parameter, plus the duration of the session. Only Azure account admins can change this parameter at the session start, and it cannot be changed at all during a session.
This rule resolution is part of the Conformity Security & Compliance tool for Azure.
Enabling the "log_disconnections" parameter starts recording PostgreSQL activity data that can be useful to identify, troubleshoot, and repair configuration errors and sub-optimal performance for your Microsoft Azure PostgreSQL database servers.
Audit
To determine if "log_disconnections" parameter is enabled for your Azure PostgreSQL servers, perform the following actions:
Remediation / Resolution
To enable the "log_disconnections" server parameter for all your Microsoft Azure PostgreSQL database servers, perform the following actions:
References
- Azure Official Documentation
- Monitor and tune Azure Database for PostgreSQL - Single Server
- Server logs in Azure Database for PostgreSQL - Single Server
- CIS Microsoft Azure Foundations
- Azure Command Line Interface (CLI) Documentation
- az postgres server
- az postgres server list
- az postgres server configuration show
- az postgres server configuration set