skirl

Listen for a real message

Listen for a real message catches what a tool really sends to a topic, so you can build a template for it by clicking on its values, and see the message as it will arrive before anything is saved. An admin then saves it as a template, and the tool's address names it.

Where it is#

On a topic's Send to this topic tab, or in Connect a system, pick Any webhook: the section is under the address. It is there for admins and for the person who made the topic; nobody else sees it, or what it catches.

Give the tool the Any webhook address first (Any webhook): a message the tool cannot deliver is not caught.

Catching a message#

Press Listen for a real message. For 15 minutes Skirl keeps the messages sent to this topic's address, and the page says until when: "Listening until 14:05: send something from the tool now. 0 of 5 caught." Send one from the tool now (its test button, or whatever makes it send).

Each message caught appears as a button with its number and time (1 · 14:02); pick one to work on it. Catch the kinds that matter, such as an alert and its recovery, to see that the template reads well for each.

Messages still arrive in the topic as usual while Skirl listens.

What is kept#

  • The five most recent messages, each at most 64 KB. Only the body and its content type are kept: not the headers, not where it came from.
  • Every message sent to the topic's address with a body while listening is caught: from this tool, from a script, with any template or none, also one the template drops.
  • Not caught: a message Skirl refuses (a missing or wrong token), a body over 64 KB, and a file.

When five are caught, the page says "5 of 5 caught: a new one replaces the oldest.", and each one that arrives while Skirl listens takes the place of the oldest. Once listening ends, what was caught stays as it is.

How long it is kept#

What was caught is deleted when a template is saved from it, when you press Forget these (which also stops listening), or 24 hours after it arrived.

Building a template by clicking#

The message caught is shown as a tree of its fields. "Click a value, then say what it is": click a value, then Title, Message, Priority, Tag or Link.

  • Title and Link: one value each.
  • Message: one value or several, one a line, in the order you pick them. Label (optional) puts a word in front of a line, as Status: down.
  • Priority: the field that says how bad it is. Then each value seen there, in the messages caught, gets a level: Default, 1, min, 2, low, 3, default, 4, high or 5, urgent. Each starts at the level Any webhook gives it there (a number from 1 to 5 as it is), or at Default. A value not seen yet gets the default, 3.
  • Tag: each value you pick becomes a tag; emoji names (warning, white_check_mark) show as emoji.
  • Remove takes a pick back.

Every part you do not pick is "as Any webhook works it out", by the rules in Any webhook. The values Any webhook found are marked in the tree ("generic: title", "generic: message") until you pick another.

As it will arrive shows the message a moment after each change, for the message chosen above. Pick each one caught in turn to check them all.

The template reads each value safely: a value that a later message does not have is left out instead of stopping the template. A value that is 0, false or empty is left out too.

The tree shows at most 20 fields of each object or list, ten levels deep, and long texts cut to 80 characters; the template uses the whole value.

A message that is not JSON cannot be clicked: the page says "This one is not JSON", and Any webhook sends it as the message itself.

Saving it#

Saving is for admins. Type a Template name (a-z, 0-9, _ and -, starting with a letter or digit, up to 64; not new, not yes, no, true, false, 1 or 0, and not auto or forgejo, the other names of generic and gitea) and press Save as template. The page then says, for a template named mytool: "Saved as mytool: the address above uses ?template=mytool, and what was caught is forgotten." Copy the new address into the tool.

  • A name that is taken asks first, and says what it would replace:

    • a template saved on this server: "A template saved here is already called mytool. Saving replaces it for every sender that uses it, and what it says now is lost."
    • a built-in template (github, grafana): "github is a built-in template. Saving replaces it for every sender whose address says ?template=github. Deleting yours later in Admin → Templates brings the built-in back."
    • this server's copy of a built-in: "This server already has its own github, in place of the built-in. Saving replaces that one, and what it says now is lost."

    Replace mytool saves over it; Keep it, pick another name saves nothing. Better: pick a name of its own.

  • The person who made the topic, if not an admin, can catch messages and click, but not save: an admin can open the same page while what was caught is kept and save it there. Your clicks are not kept: the admin picks the values again.

  • The saved template is an ordinary one, with a comment in each part you picked saying what it reads. Change it in Admin → Templates (Templates). Like every saved template but generic, it takes only JSON.

  • The address shows the saved name until you leave the page. Later it shows ?template=generic again: write your template's name in its place (the line under the address lists the templates there are).

Limits#

What Limit
Listening 15 minutes from Listen for a real message or Listen again
Messages kept 5, the most recent
One message 64 KB
Kept for 24 hours, or until saved from or forgotten
Previews 30 a minute for each person; then a pause

This page on GitHub