Skip to main content

priv/templates/parapet.gen.runbooks/provider_outage.ex.eex

defmodule <%= inspect(@module_prefix) %>.ProviderOutage do
  use Parapet.Runbook

  title("Provider Outage Handling")
  description("Guidance and actions during an external API or service provider outage.")

  step(:check_status,
    label: "Check Provider Status Page",
    description: "Verify if the provider is currently experiencing an outage.",
    type: :manual,
    kind: :guidance,
    preview_only: true,
    guidance: "Check the official provider status page. Also check third-party monitors (e.g. Downdetector) and the provider's social channels for corroborating reports.",
    warning: "The provider status page itself may be unreachable or stale during a full outage — treat a 'no known issues' status with caution if your own monitoring shows failures."
  )

  step(:request_manual_check,
    label: "Request Manual Follow-up",
    description: "Flag this provider incident for manual investigation by the team.",
    type: :mitigation,
    kind: :capability,
    capability: :request_manual_provider_check,
    target_kind: :provider,
    requires_preview: true,
    warning: "This action creates a team task visible to on-call. Avoid triggering it multiple times for the same incident — duplicate flags create noise and may mask the original alert."
  )

  step(:verify_recovery,
    label: "Verify Recovery",
    description: "Confirm the provider has recovered and dependent systems are processing normally.",
    type: :manual,
    kind: :guidance,
    preview_only: true,
    guidance: "Re-check the provider status page for a resolved status. Verify that any queued or failed requests to the provider are now completing successfully in your own monitoring or APM."
  )
end