NEW: Paste your query and schema data and we give you the best index. Launch pganalyze Index Advisor

Step 3: Stream Postgres Logs into Azure Event Hub

To send logs to the Event Hub, within your database server, go to Diagnostic settings, and add a new diagnostic setting:

  • Category Details: Select "PostgreSQLLogs" under "log"
  • Destination Details: Select "Stream to an event hub", and then select your Event Hub Namespace and Event Hub Name
Screenshot of adding PostgreSQL Diagnostic Setting in Azure Portal

Save the new diagnostic setting. Now your Event Hub should be receiving Postgres log messages.

Continue to Step 4: Adjust your Postgres log_line_prefix

Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →