Using Slack commands with FireHydrant
Running incidents and executing Runbooks can be done directly in Slack where your team is already accustomed to working. This article includes a list of FireHydrant's Slack commands.
There are a number of aliases that can be used to execute slack bot commands. The different aliases are:
- /firehydrant
- /fh
- /incident
For the purpose of this article, we will utilize /firehydrant.
Certain commands can be run anywhere while others can only be run in an active incident channel. We will denote these contexts as general and incident commands.
General Commands
These commands can be run anywhere within Slack and at any time.
Help
/firehydrant help
Provides help text and a list of available commands.
Link
/firehydrant link
If the user's Slack email address matches the user's email address in FireHydrant, we will automatically link the accounts. Otherwise, we will prompt for permissions in the interface.
Note: Users must link their Slack accounts with their FireHydrant accounts before we can automatically pull them into incidents, assign them tasks, etc.
New Incident
/firehydrant new [incident name]
Opens a dialog box asking for additional information to kick off a new incident. Here you can select the impacted environments and severity if known. Clicking Open from this dialog box creates a new Slack channel where all of your messaging is captured and sent to FireHydrant.
On-call
/firehydrant on-call
Allows you to see who's on-call for a particular service.
Note: This will only work if the service was linked and/or imported from PagerDuty or Opsgenie.
Page a Team
/firehydrant page functionality [Functionality]
Pages the on-call user/team for a Functionality.
/firehydrant page service [Service]
Pages the on-call user/team for a Service.
Note: These commands require the Service and/or Functionality to be linked to a PagerDuty or Opsgenie service.
Service Info
/firehydrant service [Service]
Pulls up information for the Service as defined in the Service Catalog. Can include things like owning and responding teams, useful links, latest known changes, etc.
Incident Commands
These are commands that can only be run in an active incident channel.
Action Items
/firehydrant add action-item
Allows you to create a post incident action item to the incident. You can also select a ticketing project which will create a corresponding ticket in said integration (e.g. Jira, Shortcut, etc.).
/firehydrant action-items
Lists out all the action items created for this incident.
Add Note
/firehydrant add note [note text]
/firehydrant post [note text]
Adds a note to the incident.
One way to think of notes are as pieces of information that are more important than normal chat messages. You can search a FireHydrant incident timeline and filter specifically by the content in a note (or notes) as opposed to typical chat messages. Adding a note gives you the option to publish the note to your status pages.
Assign Role
/firehydrant assign role
Assigning a role to someone with a linked Slack account sends that a direct message to that user, via Slack, informing them that they have been assigned a role to an active incident.
Assign a Team
/firehydrant assign team
Assigning a team allows you to bring responders into an incident quickly. When a team is selected, FireHydrant will show you a preview of the users and on-calls that will be brought into the incident. If a user has linked their FireHydrant account to Slack, they will get DMed and automatically brought into the channel as well.
Get Incident Status
/firehydrant status
Displays the high level summary of the incident. This is useful for new responders and people curious about the incident state to quickly figure out what is going on. The status is also sent to new channel joiners as an ephemeral message.
Incident Tags
/firehydrant tags
Allows you to update, add, or remove tags from an incident.
Resolve an Incident
/firehydrant resolve
This closes an incident, sets its status to resolved, and allows you to post a resolution note to any active status pages. A resolved incident continues to collect chat messages even after resolution. To re-open an incident, you must go to the command center.
Runbooks
/firehydrant runbooks
Lists out all the Runbooks that are currently attached to the incident. This will also allow you to open a Runbook and execute steps right from Slack.
/firehydrant add runbook
Allows you to add a Runbook to the incident.
Note: If a Runbook has already been added, it will not appear in the search bar.
Start retrospective
/firehydrant start retro
Allows you to create the retrospective document and update the description and customer impact.
Note: Running this command will resolve the incident if it hasn't already been resolved
Task Management
Tasks are the way to track work during the course of the incident. Tasks can be created individually by any FireHydrant user during the course of the incident or can be predefined as task lists that can be assigned automatically through a runbook or manually during the incident.
/firehydrant add task
Create a new task on the incident. This allows you to assign a task to a specific user as well.
/firehydrant add task-list
Attach a task list to the incident. Task lists are predefined sets of tasks that can be assigned to a user to capture multi-step actions for triage or mitigation. Learn more about task lists.
/firehydrant tasks [ @username | unassigned | all ]
View the task management modal. This modal allows you to filter on multiple facets:
- Assigned user
- Task state
- Task List
- Unassigned tasks
No arguments supplied will default to showing your tasks. Specifying a (Slack) username will show all the tasks assigned to that user, and all
will show you all tasks assigned and unassigned to all users.
Additionally, you can quickly assign and change the state of tasks from this modal as well.
Update Incident
/firehydrant edit
Allows you to edit the details of the incident. These details include the name, customer impact, description, infrastructure impacted, severity, and more.
/firehydrant update
Allows you to change the incident milestone and component status. From this section, you can also include a comment about why you are changing the status. If you have active status pages, you can post your update to the status pages as well.
Command Extensions
In FireHydrant, you can create custom commands that return templated replies. In addition, if these commands are run in an incident channel, you will have access to the incident
variable and subsequently all of the data available via that variable using Liquid templating.
Creating a Command Extension
Note: Creating extensions requires owner privileges
- On your integrations page, go to Slack and click the pencil to go into settings.
- Scroll down to Command Extensions and click on '+ Add command extension'.
- Fill in the details for your new extension:
- Command Name: The command you would run. For example, 'example' would be executed with
/fh example
. Must be lowercase alphanumeric, dashes, or underscores, and no more than 25 characters. - Description: Brief description for the extension.
- Reply Template: What will be returned when the user runs this command. Liquid templating is supported and you will have access to the
incident
variable. Read more about available incident data on our docs page for Liquid templating.
- Command Name: The command you would run. For example, 'example' would be executed with
Using a Command Extension
Once you've gone through the steps above to create an extension, you can make use of it by running /fh EXTENSION_NAME
.
Some example use cases:
- Quick commands to reply with links and resources, like a playbook, links to dashboards, etc.
- Quick commands to post specific incident variables and data.