# Runbook

> Template — copy this page into `operations/runbook.md` (or its own file under `operations/runbooks/`) when documenting a new operational task. Delete this callout when you're done.

|                    |                          |
| ------------------ | ------------------------ |
| **Owner**          | @your-github-handle      |
| **Pager**          | yes / no                 |
| **Severity**       | sev-1 / sev-2 / sev-3    |
| **Estimated time** | 5 min / 30 min / 2 hours |

## When to run this

Describe the symptom or alert that triggers this runbook. Be specific — pager noise is the enemy.

* Symptom: "API returns 5xx on `/api/calls/analyze` for > 5 minutes."
* Or: "Alert `pipeline-failure-rate-high` fires."

## Pre-flight

Things to confirm before taking action:

* [ ] You have access to the prod database.
* [ ] You have admin tokens for the affected user (if relevant).
* [ ] You're on a stable network.

## Diagnose

The goal is to **confirm** the cause before mitigating, so we don't fight ghosts.

```bash
# Specific log query
... | grep 'event=PIPELINE status=FAILED'

# Specific Prometheus query
rate(scryon_calls_failed_total[5m])

# Specific DB query
SELECT count(*) FROM call_records WHERE status='FAILED' AND updated_at > now() - interval '1 hour';
```

## Mitigate

Step-by-step. Concrete commands. No "see the docs".

1. ...
2. ...

```bash
# Concrete command
```

## Verify

How to confirm the fix worked.

```bash
# Concrete check
```

## After-action

* [ ] Open a post-mortem if this is a customer-impacting incident. Use [templates/postmortem.md](/templates/postmortem.md).
* [ ] File a follow-up issue to make this not happen again.
* [ ] Update this runbook with anything you learned.

## Related

* Code: `XxxService.java`
* Docs: [...](https://github.com/FluxonLabs/scryon-docs/blob/main/features/xxx.md)
* Related runbooks: [...](/templates/runbook.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scryon.app/templates/runbook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
