Incident Management CLI Commands
Proposal
Add incident management functionality to GitLab CLI
One of the responsibilities of the Monitor::Respond group is work on the Incident Management category. Some parts of that category (incidents, alerts, timeline events) can fit into GitLab CLI.
Adding the incident management functionality to the app can provide some benefits to the users, such as: prevent context switching, automatization (some commands could be use from scripts, etc.). It can also be considered as nice to have functionality.
Known issues
Some of the incident management related APIs are only available in GraphQL.
go-gitlab
does not support GraphQL (at the moment).
In order to introduce that part of functionality we would need to add GraphQL support in some way.
Incident management sub-categories
Here is some information about suggested incident management parts in more details, with some possible glab
commands.
Alerts
Alerts can be triggered by an external monitoring tool. Once it reaches GitLab an alert can be created containing detailed information. When alerts are created, the users can see the list of alerts, view alert's details, change severity and status, etc.
Possible commands
Most (if not all) of them need GraphQL
- View alerts list
- View an alert's details
- Close an alert
- Change an alert's severity
- Change an alert's status
- Change an alert's assignee
- View an alert's activity feed
Incidents
Incidents are a GitLab Issue type. issue_type
can be converted back and forth from incident to issue.
Incidents include some extra features:
- Severity: Critical, High, Medium, etc.
- Status: Triggered, Acknowledged, Resolved.
- Timeline events (see below).
Possible commands
- View the incident list feat: add incident list command (!1077 - merged),
📹 demo - View an incident's details
- Create an incident
- Change an incident's severity (needs GraphQL)
- Change an incident's status (I think needs GraphQL)
- Change an incident's assignee
Timeline events
Timeline events are a part of incidents. A timeline includes key incident events like when the alert was first triggered, when the root cause was determined, etc.
Possible commands
GraphQL only
- View timeline events list
- Create a timeline event
- Edit a timeline event
- Delete a timeline event