Overview
The API filter of a service decides what each API call does: open an incident, resolve one, or nothing. Each filter has a Trigger part and a Resolve part. A service can have up to 10 filters.
Start from a template
In Select Integration Template, choose your tool if it is listed. SQIBS fills in the trigger and resolve values; every value stays visible and you can change it. Step-by-step guides for each tool are in the integrations.
Fields
| Field | Part | What it does |
|---|---|---|
| Priority | Trigger | The priority (urgency) of the incident this filter opens. |
| Payload JSON key | Both | Where to look in the payload. Empty = the whole payload. |
| Key value contains | Both | Words the value must contain, all of them (AND), case-insensitive. Empty = the key only has to exist. |
| Incident title from | Trigger | Key whose value becomes the title. |
| Incident description from | Trigger | Key whose value becomes the description. Empty = the whole payload. |
| Map incident with | Trigger | Key whose value ties the incident to its later resolve message, for example an alert id. |
| Incident mapped with | Resolve | Key in the resolve message with the same value. Open incidents with that value are resolved. |
Up to 10 key and value pairs per part, combined with AND. The words in one Key value contains may total 2000 characters.
Writing JSON keys
- Put each key in double quotes and join levels with dots, up to 5 levels:
"trigger"."message". - Pick an array item with its index:
"trigger"."extra".[0]."reason". - Escape a double quote inside a key with a backslash:
"example\"s". - Keys are case-sensitive; values in Key value contains are not.
For this payload:
{
"incident_from": "Sqibs",
"trigger": {
"urgency": "high",
"message": "Db server down.",
"extra": [ { "reason": "No memory" } ]
}
}
| Key | Selects |
|---|---|
"incident_from" |
Sqibs |
"trigger"."urgency" |
high |
"trigger"."message" |
Db server down. |
"trigger"."extra".[0]."reason" |
No memory |
In the API Integration window, click the round
{} button at the bottom right. Paste a payload that SQIBS received (copy it from the API log). SQIBS lists every key with its value, each with a copy button. Copy the key into Payload JSON key and the value into Key value contains. No need to read the JSON by hand.How filters are checked
- Filters are tried in the order they were created; the first that matches is used. Different filters are alternatives (OR).
- In a filter, the resolve part is checked first. If both parts match, only the resolve happens.
- With no key and no values, every call matches. Use this only for testing.
Changes can take up to 10 minutes to apply. Incident titles are capped at 5000 characters and descriptions at 10000.
Test it
The API log saves payloads only while API Tracking is on for the token. Turn it on under API Tokens before you test; it switches itself off after 48 hours.
Send a test, open the API log, paste the payload into the JSON key creator and adjust the keys.
Fix known issues automatically
Many alerts have a known fix: restart a service, clear a full disk, run a health check. SQIBS can run that fix for you the moment the incident opens. This is event-driven auto remediation. For example, a filter that opens incidents for disk-full alerts can run a workflow that clears old logs.
Safe by design. SQIBS runs only workflows your own engineers wrote and approved for your environment. Nothing is guessed or generated: the same steps an engineer would run by hand, run sooner. If the workflow does not fix the issue, the engineer is paged as usual.
To set it up, in the same API filter:
- Select Workflow: choose the automation workflow to run when this filter opens an incident.
- If success then make incident resolved: turn on to resolve the incident when the workflow succeeds.
- Waiting time for escalate to escalation policies: how many minutes to give the workflow before paging the on-call engineer.
Start with low-risk workflows, such as a health check, and add fixes as you come to trust them.
Learn more:
- Prometheus: incident auto remediation, a full worked example.
- Automation workflow: build a workflow from actions.
- Run workflows where your systems are: SSH, Bash, PowerShell, Python, Ansible, kubectl, Terraform.