Using Console
Using CLI
<ResourceGroupName>
with the name of the resource group where the PostgreSQL server is located.Step 5: Once you have the resource ID of the PostgreSQL server, use the below command to update the server configuration and enable the “LOG_DISCONNECTIONS” parameter:<ResourceGroupName>
with the name of the resource group where the PostgreSQL server is located and <PostgreSQLServerName>
with the name of the PostgreSQL server.Step 6: After executing the above command, the “LOG_DISCONNECTIONS” parameter will be enabled for the PostgreSQL server.That’s it! You have successfully remediated the misconfiguration “Enable ‘LOG_DISCONNECTIONS’ Parameter for PostgreSQL Servers” for Azure using Azure CLI.Using Python
<client-id>
, <client-secret>
, <tenant-id>
, <subscription-id>
with your own values.
<resource-group-name>
with the name of the resource group where your PostgreSQL servers are located.
log_disconnections
parameter. You can do this using the following code:
log_disconnections
parameter.
log_disconnections
parameter is enabled by connecting to your PostgreSQL server and checking the PostgreSQL logs.
<server-name>
, <username>
with your own values.