Slack
Slack is a communications platform that makes it easy to message team members and collaborate on projects. By integrating Slack with Cortex, you can conveniently access information from Cortex without opening the app.
In this guide, you’ll learn how to set up and use the Slack integration. The Cortex app in Slack has the following capabilities:
- Onboarding management and guidance
- On-call assistant (PagerDuty only)
- Notifications:
- Entity score evaluation
- Initiative creation and reminders
- Integration configuration errors
- API key expiration
- Rule exemption request
- Weekly summaries of entity performance
- Querying entity metadata through the Cortex bot
Setup and configuration
Getting started
Users must have admin permissions in Cortex to set up the Slack integration, and must be designated as an administrator in Slack to install Cortex's app.
You need to be a Slack administrator in order to install Cortex's app for Slack.
Configuration
You can connect your Slack workspace directly from Slack settings in Cortex. If your workspace isn't already linked, you'll see the option to connect with Slack. Follow the prompts in the modal to set up the integration.
If you do not see the settings page you're looking for, you likely don't have the proper permissions and need to contact your admin.
If you’ve set everything up correctly, you’ll see the option to Remove Integration in settings.
You can also use the Test configuration button to confirm that the configuration was successful. If your configuration is valid, you’ll see a banner that says “Configuration is valid. If you see issues, please see documentation or reach out to Cortex support.”
If you're using Cortex Server, you'll need to follow a manual configuration process to use Cortex's app for Slack. Reach out to the support team to receive instructions.
Limiting Slack notifications
Admins can enable or disable notifications for users and teams by toggling Enable Slack notifications under Notifications availability in notifications settings.
From this page, you can enable or disable specific notification types for all users in your organization.
You can also define a CQL query that will limit the notifications you receive. Any entities that do not match your query will be excluded from all notifications, while those that do match the query will continue triggering notifications for owners.
These queries cannot use third-party integrations. Common allowed queries include groups and custom data filters.
Registration
Entity descriptor
Define one of the following blocks in an entity descriptor for any entity type to add Slack channels by name or ID. Defining a Slack channel will enable direct access to the channel from the entity's page in Cortex.
You can define a channel with either the name or ID blocks below. When you define by name, it'll be immediately recognizable in the entity's YAML. However, if a Slack channel's name is likely to change, it's better to define by ID, because it won't break during renames.
You can manually add any Slack channels this way without setting up the integration via the API. Slack uses a redirect feature based on the channel's name to find the channel after directly logging in: slack.com/app_redirect?channel={channel_name}
.
All of the following definitions include a notificationsEnabled
field. If notificationsEnabled=true
, owners will receive relevant notifications, unless they have disabled notifications.
Defining notificationsEnabled=false
will exclude an entity from certain notifications.