Documentation

Slack alerts: post Pingsured alerts to a Slack channel

Pingsured can post an alert to a Slack channel when a ping starts failing, when it recovers and when its certificate is replaced. It is a webhook that speaks Slack: you give Pingsured a Slack webhook URL, and every alert arrives in that channel as a readable message. Slack alerts are available on the same plans as webhooks, every paid plan. An account owner or manager sets them up, either for one ping or as the default for every ping in the account.

What you need

  • A Slack workspace in which you may add an app, or an administrator who will approve it.
  • The channel the alerts should go to. One webhook posts to one channel; to alert a second channel, create a second webhook.

Create the webhook in Slack

Create the webhook from a Slack app, not from the older "Incoming WebHooks" integration in Slack's app directory. Slack no longer recommends that integration and may remove it.

  • Open api.slack.com/apps and choose Create New App, then From scratch. Name it, for example, Pingsured, and pick your workspace.
  • In the app's settings open Incoming Webhooks and switch it on.
  • Choose Add New Webhook to Workspace, pick the channel and allow it.
  • Copy the Webhook URL. It begins with https://hooks.slack.com/services/.

Treat the URL as a secret: whoever has it can post to that channel. Pingsured shows it in full only to owners and managers.

Add it in Pingsured

  • For every ping, open Settings → Notifications, go to Integrations under Default notifications and choose the Slack card.
  • For one ping, open the ping, go to its Notifications section, choose Add subscription and pick Slack.

Paste the webhook URL. Pingsured accepts only Slack's own addresses, so a URL from another service is refused when you save it. Then choose the triggers. The recommended set is First error and First ok, with Certificate changed if you check certificates: you hear when something breaks and when it is fixed.

Choose Send test next to the channel to post a message marked as a test. It is the quickest way to find out that the URL and the channel are right before an alert depends on them.

What a message looks like

  • A headline with the ping's name and a dot that shows its state: red when it is failing, yellow when it is degraded, green when it has recovered.
  • The reason, when there is one: the HTTP status, the error, or why a content check failed.
  • Where it was seen: either the location, such as From de, or, for a ping checked from several, which of them are failing, such as Failing from de, sg (2 of 3 locations).
  • A link, View ping in Pingsured, that opens the ping.

A certificate change reads Certificate changed on the ping, or Unexpected certificate on it when something about the change is not what a renewal looks like, with the reasons beneath.

The language of the messages

Messages are written in the account's notification language, which an owner sets under Settings → Account. The messages come in English, German, Spanish, French and Italian. Until it is set they are in English. The same setting is the fallback language for alert emails to members who have not chosen one of their own. The reason line is shown as the checked service reported it, in whatever language that was.

When messages are sent

A Slack channel follows the same rules as every other alert channel: which changes, how many failures first, how often and from where are described in the notifications page. A change of status is always sent at once, and repeat alerts for the same ping and channel are held back for 15 minutes.

If a message does not arrive

When Slack cannot be reached or answers with an error that may pass, the delivery is retried, 5 attempts in all, 30 seconds, 5 minutes, 30 minutes and 2 hours apart. Any other answer from Slack is final. Slack replies with a short reason, for example no_service when the webhook was removed or channel_is_archived when the channel was archived, and Pingsured shows what Slack said when you hover over the status badge next to the channel in Settings → Notifications. The fix is usually a new webhook: create one in the Slack app, add it in Pingsured and remove the old one.

Limits

  • Slack channels count with webhooks toward the same limits: 50 account-wide and 20 on one ping.
  • Messages go to the channel the webhook was created for. Mentions, direct messages and threads are not available yet.