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](/static/add-diagnostic-setting-b425b246e9e5bc6a7bb8b609d5c9a291.png)
Save the new diagnostic setting. Now your Event Hub should be receiving Postgres log messages.
Continue to Step 4: Adjust your Postgres log_line_prefixCouldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →