Adding Notification Integrations (Email, Slack Bot, PagerDuty)
To receive alerts and notifications in TrueFoundry, you need to set up notification integrations for Email, Slack Bot, and PagerDuty. This guide walks you through adding all types of integrations, describing each field in the forms, and providing helpful links for setup.
Email Notification Integration
To add an Email notification integration:
- Go to the Integrations Tab in the TrueFoundry UI.
- Click on ‘Add Integration Provider’.
- Select ‘Custom’ as the provider type.
- Choose ‘Email Notification Channel’ in the integrations section.
- Fill out the form fields as shown below:
Field Descriptions
- Name: A unique name for this integration provider (e.g., “Production SMTP”).
- Custom Basic Auth (Optional): Enable if your SMTP server requires custom authentication.
- Display Name: The display name for this email notification channel (e.g., “Alerts Email Channel”).
- From Email: The email address that will appear as the sender of alert emails.
- SMTP Credentials:
- Host: The SMTP server hostname (e.g.,
smtp.gmail.com
). - Username: The username for SMTP authentication (often your email address).
- Password: The password or app-specific password for SMTP authentication.
- Port: The port for SMTP (commonly
587
for TLS,465
for SSL, or25
for non-encrypted). - TLS: Enable if your SMTP server requires TLS encryption (recommended for most providers).
- Host: The SMTP server hostname (e.g.,
- Access Control (Optional): List of users or groups allowed to use this integration. By default, set to
everyone
.
Note:
- For more information about SMTP and how to get your SMTP credentials, see What is SMTP? (Mailgun Docs).
- If using Gmail, you may need to generate an App Password and enable “Less secure app access” or use OAuth2.
How to get SMTP credentials?
AWS SES
- For AWS SES, you can use the IAM user credentials to get the SMTP credentials. Follow the AWS SES documentation to get the SMTP credentials.
- SMTP Host can be found in the AWS SES console under the “SMTP Settings” section.
- Add your domain as verified Identity in the AWS SES console. Follow the AWS SES documentation to verify your domain.
Slack Bot Notification Integration
To add a Slack Bot notification integration:
- Go to the Integrations page in the TrueFoundry UI.
- Click on ‘Add Integration Provider’.
- Select ‘Slack’ as the provider type.
- Choose ‘Slack Bot Token Integration’ in the integrations section.
- Fill out the form fields as shown below:
Field Descriptions
- Name: A unique name for this integration provider (e.g., “Slack Alerts Bot”).
- Display Name: The display name for this Slack bot integration (e.g., “Critical Alerts Bot”).
- Bot Token: The OAuth token for your Slack bot. This is required for the bot to send messages to channels.
- Access Control (Optional): List of users or groups allowed to use this integration. By default, set to
everyone
.
How to create a Slack Bot Token:
- Go to the Slack API: Your Apps page.
- Click “Create New App” and follow the prompts.
- Add the
chat:write
andchat:write.public
scopes under “OAuth & Permissions”.- Install the app to your workspace and copy the Bot User OAuth Token (starts with
xoxb-
).- For more details, see the Slack Bot User OAuth Access Tokens documentation.
PagerDuty Notification Integration
To add a PagerDuty notification integration:
- Go to the Integrations page in the TrueFoundry UI.
- Click on ‘Add Integration Provider’.
- Select ‘PagerDuty’ as the provider type.
- Choose ‘PagerDuty Integration’ in the integrations section.
- Fill out the form fields as shown below:
Field Descriptions
- Name: A unique name for this integration provider (e.g., “dev-pagerduty”).
- Display Name: The display name for this PagerDuty integration (e.g., “pagerduty-prometheus-channel”).
- Integration Key: The integration key from your PagerDuty service (required for sending alerts).
- Integration URL: The PagerDuty Events API URL (example:
https://events.pagerduty.com/generic/2010-04-15/create_event.json
). - Access Control (Optional): List of users or groups allowed to use this integration. By default, set to
everyone
.
How to get PagerDuty Integration Key:
- Go to your PagerDuty Services page.
- Select the service you want to integrate with Prometheus.
- Under “Integrations”, click “Add Integration” and select “Prometheus” from the list and fill other details.
Make sure you select prometheus from the list of integrations, else the alerts will not be sent to PagerDuty.
- Copy the generated Integration Key and Integration URL and use it in the form above.
- For more details, see the PagerDuty Prometheus Integration Guide.
Access Control
For all integrations, you can restrict access to specific users or groups by editing the Access Control field. By default, it is set to everyone
so all users can use the integration.
Final Steps
- After filling all required fields, click Add Integration Provider to save your integration.
- You can now use these integrations as notification channels when setting up alerts for your applications.
With these integrations in place, you can receive real-time alerts via Email or Slack or PagerDuty for all your TrueFoundry applications!