The Cortex Slack bot offers a convenient way to access information from Cortex without opening the app. To set up the Slack bot, first navigate to Integrations in the settings.
Note: Only admins have access to Integrations.
You can find Slack by scrolling through Available Integrations or by using the menu bar.
Select Add to Slack.
This will open a new window where you can enter your organization's Slack information, and Cortex will take care of the rest.
If you need to disconnect from Slack at any point, you can do so from settings.
If you have any Slack-related Scorecard rules, those rules will fail to evaluate once Slack is removed. Any Slack channels listed in details pages will no longer populate.
Slack bot commands
Once the Cortex Slack bot is set up, you can interact with it in any chat by calling /cortex, followed by a command.
At the end of this article, you can find a full list of commands. For now, we’ll look at a few of the most helpful ones.
/cortex help
When in doubt, enter /cortex help to see the full list of commands within Slack:
/cortex service and /cortex resource
To get high-level information about a particular service or resource, including its owners, current on call rotation, links, and recent events, enter /cortex service or /cortex resource, followed by the tag assigned within Cortex:
This command will also return a direct link to the details page for that service or resource, so you can easily access it from Slack. If there’s an incident or an outage, this is a quick way to gain insight into the most recent events and contact the team members on call.
/cortex dependencies
You can also quickly access first-level dependencies for a service or resource by entering /cortex dependencies, followed by the tag:
This will display both outgoing and incoming dependencies, and the Slack bot will provide a link to the entity's details page as well.
/cortex scores
To see how a service is performing, you can use /cortex scores to pull Scorecard data associated with that service:
If your service is evaluated on more than one Scorecard, all of the relevant Scorecard scores will populate. Note: This command requires a service tag and will not work for a resource.
/cortex search
If you’re unsure of exactly what you need, you can use /cortex search to find everything within Cortex that matches your query:
Full list of commands
The commands below will work for any service or resource tagged in Cortex:
- /cortex dependencies <tag>
- Lists all incoming and outgoing first-level dependencies.
- /cortex docs <tag>
- Lists all documentation links.
- /cortex links <tag>
- Lists all links.
- /cortex links [type] <tag>
- Lists all links of a particular kind, such as “metrics” or “openapi.”
- /cortex logs <tag>
- Lists all logs.
- /cortex oncall <tag>
- Pulls the current on-call rotation.
- /cortex owners <tag>
- Lists all owners and provides email addresses.
- /cortex resource <tag>
- Lists resource information, such as owners, current on call rotation, links, and timeline events.
- /cortex runbooks <tag>
- Lists all runbook links.
- /cortex scores <service tag>
- Lists all scorecard scores that are associated with the service.
- Note: This command requires a service tag and will not work for a resource.
- /cortex search <query>
- Query within Cortex.
- /cortex sentry <tag>
- Lists recent Sentry issues.
- /cortex service <tag>
- Lists service information, such as owners, current on call rotation, links, and timeline events.
- /cortex timeline <tag>
- Lists recent timeline events.
Comments
0 comments
Article is closed for comments.