Introducing Query Tuning Workbooks to safely tune Postgres queries on production with pganalyze!

Enterprise Server: How to Set Up Slack and PagerDuty Integration

In order to provide notifications about issues discovered in your database, pganalyze provides support for integrating with Slack or PagerDuty. These integrations require additional setup for pganalyze Enterprise Server.

Slack

First you will need to create your own Slack "app". You should be able to follow the Slack instructions. It does not need to be a published app. Once this is done, go through the following:

  1. Under Oauth & Permissions in the Slack app, the redirect URLs should include the address where you're hosting pganalyzee.g., https://app.pganalyze.com for the public pganalyze app
  2. On the same page, the Scopes should be "channels:read" and "chat:write"
  3. Copy the generated Client ID and Client Secret and set those as environment variables SLACK_CLIENT_ID and SLACK_CLIENT_SECRET in your pganalyze container configuration
  4. Restart the pganalyze Enterprise Server container to apply the new configuration
  5. Install your Slack app to your Slack workspace: You can do this in Slack through the Apps section in the left-hand menu
  6. In pganalyze, go to the Integrations tab in the Settings page and enable the Slack integration

PagerDuty

You will need to create a new "application" in PagerDuty:

  1. Go to https://[your-pagerduty-subdomain].pagerduty.com/developer/applications/new
  2. Enter a name and description
  3. Under "Functionality", check "Events Integration"
  4. Click "Next" to configure the Events Integration
  5. Under "Redirect URLs", add https://[your-pganalyze-domain]
  6. Click "Register App"; you should be taken back to the app list (https://[your-pagerduty-subdomain].pagerduty.com/developer/applications)
  7. Copy the app id from the App Id column for the application you just created
  8. Save the app id as PAGERDUTY_APP_ID in your pganalyze .env file

Once these steps are done on the PagerDuty side, you'll need to complete the integration setup on the pganalyze side:

  1. Restart the pganalyze container to ensure the new PAGERDUTY_APP_ID setting is picked up
  2. Log in and go to the Integrations tab on the Settings page
  3. Click "Connect to PagerDuty"
  4. Log in to PagerDuty and select the services you'd like to be able to send pages to, the click Connect. You should be redirected back to pganalyze.
  5. Next to the "Test Integration" button, select a service to send a test alert to and click Test Integration

You should now receive a test page from pganalyze through PagerDuty and the integration will be complete.


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