Skip to Content

Rule Sets

The rule sets list

A rule set is a named collection of rules with its own public ingest endpoint. Event sources send events to a rule set; the rules inside it decide what happens.

The table lists each rule set with its Name, Slug, number of Rules, and Created By. Use the row actions to open its rules, edit it, export it, import rules into it, or delete it.

Create or edit a rule set

Select Create (or the edit action on a row) to open the rule set form.

FieldRequiredDescription
NameYesA human-friendly name for the rule set, for example "Production Syslog". Shown throughout the UI.
SlugYesThe URL-safe identifier used as the API endpoint. Lowercase letters, numbers, and hyphens only. Event sources post to /api/events/<slug> on the listener. Choose a stable value, because changing it changes the ingest URL.
Ingest TokenRead-onlyA secret token generated automatically when the rule set is created. Event sources must send it in the X-Ascender-Token HTTP header to be accepted. Use the Copy button to copy it. Treat it like a password.

When you create a new rule set, the form stays open in edit mode so the generated Ingest Token is displayed and can be copied. Senders that do not present the correct token are rejected.

Warning

Deleting a rule set also deletes all of its rules. This cannot be undone.

Sending events to a rule set

Event sources send an HTTP POST to the listener at /api/events/<slug>, with the rule set's ingest token in the X-Ascender-Token header (an Authorization: Bearer <token> header is also accepted). For example:

curl -X POST https://reaqt-listener.example.com/api/events/dev-servers \ -H "Content-Type: application/json" \ -H "X-Ascender-Token: <paste-ingest-token>" \ -d '{"message": "ERROR: something happened"}'

The listener acknowledges the request immediately (HTTP 202) and evaluates the rules in the background. The request body becomes event.payload in your rulebooks; see Event data. A body that is a JSON array is treated as a batch, and each element is processed as a separate event.

The listener address depends on your installation; see Installing Reaqt.

Exporting and importing rule sets

Use the Export row action to download a rule set and all of its rules as a YAML file named after the slug, for example dev-servers.yaml.

Use the Import row action to load rules into an existing rule set from a YAML file exported from Reaqt:

  1. Select Import on the rule set's row.
  2. Choose the YAML File.
  3. Select Import.

The import overwrites the rule set's name, slug, and ingest token, and replaces all existing rules with the contents of the file. The whole file is validated first: every referenced provider and template must already exist, and every rulebook must be well-formed. If any check fails, nothing is changed.

Warning

The exported file contains the rule set's ingest token, so store it as securely as the token itself. Because an import can change the slug and token, it breaks existing senders until they are updated.