Response plans
APM → Alerts & anomalies → Response plans keeps the steps to follow when an event comes in: call your job server (AWX, Jenkins, Rundeck or any other HTTP API), open a document, do something by hand, wait until the service's metric is back to normal and, at the end, prove the fix held with Spitfire's own test or monitor check.
Spitfire never runs commands on your servers and the Agent stays read-only: an HTTP step only calls the job server whose address you type, and that server does the work.
How it works
- A plan has a rule (service, type, source, environment, host, severity, words) and 1 to 10 steps that run in order.
- The Response plans card on the event page shows the plans whose rule matches that event and why they match. Plans that worked before on the same service come first, with "worked 3 of 4 times" next to them.
- A plan starts with the Run button on the event page or with an event policy's Response plans action.
- The steps run in order; when a step fails the plan stops and the cause is written under the step. Every run goes on the event's timeline and the plan's Runs list.
"Worked" means the plan's verification step passed or, without one, the event was resolved within 2 hours of the run. The count covers the last 90 days.
Step types
| Step | What it does |
|---|---|
| HTTP request | Sends a request whose URL and body are filled from the event. Timeout 1 to 30 seconds (10 by default); redirects to another host are not followed; the first 2 KB of the answer is kept |
| Document link | Shows a runbook or wiki page as a link on the event page |
| Manual step | Says what to do and waits until someone presses Done, go on |
| Wait for the metric | Waits until the service's APM error rate, p95 or average latency stays under the threshold for N minutes; fails when the time is up |
| Verify with Spitfire | Runs the chosen test schedule or synthetic monitor now; when it passes the run is marked Fixed and verified, when not Still failing |
Placeholders in the URL, headers, body and text are filled from the event: {{service}}, {{host}}, {{env}}, {{event.id}}, {{event.title}}, {{event.severity}} and {{tag.<key>}} for the event's tags. The host name cannot be a placeholder, it is written out: secret headers only go to the host you type. The editor's i shows the full list.
Set up the first plan
- On the Response plans page press New plan.
- In the Start from row pick your job server: AWX job template, Jenkins job, Rundeck job or Manual steps.
- Type the plan's name in Name (e.g.
restart checkout). - Under Suggest on events where type the service in Services (e.g.
checkout). - In the HTTP step replace the sample address and job number in the URL with your own.
- Type the token in the value field of the header marked Secret (
Bearer <token>orBasic <base64>for AWX and Jenkins; only the token for Rundeck). - Press Try: the request goes out now with a sample event and the answer's status shows under it. Nothing is saved.
- Press Save.
Check: the plan shows in the list; on a checkout event's page it is in the Response plans card.
Secret headers
The values of headers marked secret are stored encrypted and are never shown back on any screen, answer or preview (•••••• shows instead). When you edit, the field says Kept:
- Leave the field empty and the stored value stays.
- Type a new value and it replaces the old one.
- Press Remove and the value is deleted.
When the URL is changed to another host the stored value is not sent there; saving asks you to type the secret again. Without a secret key on the installation a secret header cannot be saved, and the screen says so.
Run from the event page
- On the event page find the Response plans card.
- On the plan's line Matched shows which fields matched the rule.
- Press Run. The dialog shows every step filled in with this event's values; secret headers are masked.
- Press Run the plan.
Check: the card shows the plan with a Running badge and the steps under it as they finish; a Response plan line appears on the event's timeline.
At a manual step the card shows Waiting for you; do the work and press Done, go on. Cancel stops the run. A user with the viewer role sees plans and runs but cannot run, continue or cancel them.
Start on its own from a policy
- On the Event policies page open the policy.
- Under Actions add Response plans.
- Tick the plans to start (5 at most) and press Save.
Check: when an event that matches the policy opens, the plans start on their own and the event's Policy trail says Response plans started.
A policy does not start plans on an event inside a maintenance window. A plan with a manual step waits for a person on the event page even when a policy started it.
Verification
The Verify with Spitfire step is there to prove the fix under load:
- Add the step type Verify with Spitfire.
- In What to run choose A test schedule or A synthetic monitor.
- Pick the schedule or the monitor from the list.
- Type the longest wait in give up after (e.g.
30).
The schedule's test runs; when it passes its thresholds the run becomes Fixed and verified, when not Still failing, with a link to the result next to the step. When the verification cannot start at all (e.g. license limit, maintenance window, no free runner) the step says why and the run gets no verdict.
Troubleshooting
| What you see | What to do |
|---|---|
| The job server answered HTTP 401/403 | Check the token and the header name; type the secret again and save |
| The host did not answer | Check that the controller can reach the job server over the network |
| The server redirected to another host | Use the final address in the URL; the redirect is not followed so the token does not go to another host |
| APM is off | The wait-for-metric step needs APM data; turn APM on or remove the step |
| The plan is already running on this event | Wait for the run to finish or press Cancel on the card |