Skip to main content

nifectl incidents Command Reference

View and manage SRE incidents.

Overview​

The incidents commands list, show, open and resolve the incidents of an organisation. They match the Incidents page of the nife.io dashboard.

An incident has a status (active, acknowledged, investigating or resolved) and a severity (critical, warning or info). Anywhere an incident ID is needed you can give just its first characters, as long as they match only one incident.

Subcommands​

SubcommandDescription
incidents listList the incidents of an organization
incidents showShow one incident
incidents createOpen an incident
incidents resolveResolve an incident
nifectl incidents <subcommand> [flags]

Options​

--org string Slug of the organization (asked if you have more than one)
-h, --help Help for incidents

Global Options​

-t, --access-token string Nife API Access Token
-j, --json JSON output format
-V, --verbose Verbose / debug output

incidents list​

List the incidents of an organization.

Statuses: active, acknowledged, investigating, resolved. Severities: critical, warning, info.

nifectl incidents list [flags]

Options:

--org string Slug of the organization (asked if you have more than one)
--status string Show only incidents with this status, for example active or resolved
--severity string Show only incidents of this severity: critical, warning or info
--app string Show only incidents of this app
--limit int Most incidents to show (default 50)

Examples:

nifectl incidents list --org acme --status active
nifectl incidents list --org acme --app shop --severity critical

incidents show​

Show one incident.

Show an incident with its root cause, resolution and postmortem. The ID can be the first characters of the ID, as long as they match only one incident.

nifectl incidents show INCIDENT-ID [flags]

Options:

--org string Slug of the organization (asked if you have more than one)

Examples:

nifectl incidents show 8f3c1a52 --org acme

incidents create​

Open an incident.

Open an incident for an app. Anything you leave out is asked for.

Incident types in the dashboard: api_failure (the default), system_overload, error_spike, resource_exhaustion, performance_degradation.

nifectl incidents create [flags]

Options:

--org string Slug of the organization (asked if you have more than one)
--app string App the incident is about
--service string Service of the app (default: the app name)
--type string Incident type (default "api_failure")
--severity string critical, warning or info (default "warning")
--title string Short title
--description string What is happening

Examples:

nifectl incidents create --org acme --app shop --title "Checkout is failing" \
--description "500s on /checkout since 10:05" --severity critical

incidents resolve​

Resolve an incident.

The ID can be the first characters of the ID, as long as they match only one incident.

nifectl incidents resolve INCIDENT-ID [flags]

Options:

--org string Slug of the organization (asked if you have more than one)
--resolution string How it was fixed (default "Resolved")
--root-cause string What caused it

Examples:

nifectl incidents resolve 8f3c1a52 --org acme --resolution "Rolled back to v12" --root-cause "Bad config"

Best Practices​

  • Use nifectl incidents show ID to read the root cause, resolution and postmortem before you start digging.
  • Give --root-cause and --resolution when you resolve an incident so the next person can see what happened.
  • Filter with --app to see only the incidents of one application.
  • Combine --status active and --severity critical to list what needs attention first.

See Also​

Summary​

Nifectl Incidents lets you open, follow and close incidents from the terminal, with the same details the dashboard shows.