Track Query Advisor Insights With Alerts
Query Advisor automatically detects optimization opportunities, but you need to configure alerts to get notified when new insights are discovered. This guide covers setting up alerts for Query Advisor insights and integrating with your notification workflows.
Alert configuration overview
Query Advisor checks are enabled by default for all databases in your pganalyze organization on Scale (v4) and Enterprise plans, but alerts must be explicitly configured to receive notifications about newly detected optimization opportunities.
Query Advisor insights are raised at “info” severity. Because e-mail and PagerDuty alerts are only sent for critical issues, notifications for new insights are delivered through Slack, or through a custom integration with the getIssues API.
Enabling Slack alerts
- Connect the pganalyze Slack integration.
- On the Alerts & Check-Up page, open the Alert Destinations tab and create (or edit) a destination with a Slack channel target.
- On the Alert Rules tab, create a rule that includes the “Advisor Insights” check and routes to that destination. Leave the server unset to apply the rule to all servers, or select a specific server.
New Query Advisor insights for the matching servers will then be posted to the selected Slack channel.
Troubleshooting alerts
No alerts despite detected insights
- Check auto_explain configuration: Ensure EXPLAIN plans are being collected and all settings are correctly set:
log_analyzeis enabled,log_formatis set tojson. - Verify your alert rule and destination: Ensure an alert rule includes the Advisor Insights check and routes to a destination with a Slack channel target.
Next steps
- Query Advisor workflow - Learn the complete optimization process
- Workbooks integration - Set up testing environment for validating insights
- Check-Up configuration - Configure other pganalyze automated checks and alerts
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →