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:
- Under Oauth & Permissions in the Slack app, the redirect URLs should include the address where you're hosting pganalyze—e.g., https://app.pganalyze.com for the public pganalyze app
- On the same page, the Scopes should be "channels:read" and "chat:write"
- Copy the generated Client ID and Client Secret and set those as environment variables
SLACK_CLIENT_ID
andSLACK_CLIENT_SECRET
in your pganalyze container configuration - Restart the pganalyze Enterprise Server container to apply the new configuration
- Install your Slack app to your Slack workspace: You can do this in Slack through the Apps section in the left-hand menu
- 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:
- Go to
https://[your-pagerduty-subdomain].pagerduty.com/developer/applications/new
- Enter a name and description
- Under "Functionality", check "Events Integration"
- Click "Next" to configure the Events Integration
- Under "Redirect URLs", add
https://[your-pganalyze-domain]
- Click "Register App"; you should be taken back to the app list (
https://[your-pagerduty-subdomain].pagerduty.com/developer/applications
) - Copy the app id from the App Id column for the application you just created
- 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:
- Restart the pganalyze container to ensure the new
PAGERDUTY_APP_ID
setting is picked up - Log in and go to the Integrations tab on the Settings page
- Click "Connect to PagerDuty"
- 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.
- 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 →