Server logs option in Azure PostgreSQL Flexible Server

sappu solanki 66 Reputation points
2022-04-28T10:08:18.933+00:00

I am currently using Azure PostgreSQL single server and planning to upgrade to Azure PostgreSQL Flexible Server.
One of the drawback I came across was "Server Logs" option is not available under Monitoring pane in Azure PostgreSQL Flexible Server.
This is easily available in Azure PostgreSQL Single Server which generates nice logs output on hourly basis.
Can anyone help me with where to find such Server Logs option in Azure PostgreSQL Flexible Server or any alternate option where logs will be generated on hourly basis ??

Azure Database for PostgreSQL
0 comments No comments
{count} votes

Accepted answer
  1. Anurag Sharma 17,561 Reputation points
    2022-04-28T12:29:46.55+00:00

    Hi @sappu solanki , welcome to Microsoft Q&A forum.

    As I understand, you would like to access the server logs in Azure PostgreSQL - Flexible Server similar to Single Server.

    To achieve this, we need to configure Monitoring -> Diagnostic Settings as mentioned in the below screenshot. Then we need to choose one of destination details (like Log Analytics Store) that will store our logs:

    197402-image.png

    Once this is configured, the logs will flow to Azure Log Analytics workspace and we can run below query to get them.

    AzureDiagnostics   
    | where Category == "PostgreSQLLogs"  
    

    197334-image.png

    Referenced Article: Configure and Access Logs in Azure Database for PostgreSQL - Flexible Server

    Please let us know if this helps or else we can discuss further on the same.

    ----------

    If answer is helpful please click on 197412-image.png as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions. Thank you for helping to improve Microsoft Q&A!

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful