Skip to main content

Passing Derade Reason to Alert Channels

Hi Team,

First of all, thanks for the amazing product. You are the best, really!

I have a feature request. I am using markCheckAsDegraded('Reason') to mark some Browser checks as degraded. E.g. in my case I have cryptopayment server and I check payment channels one-by-one. If one is missing, I mark check as degraded with the reason “Lightning payments unavailable”. It would be perfect to have a way to pass this reason to the alert message. I've found the way to edit the alert message template, but I can't find a variable to access degrade reason. It would be perfect if you provide such variable. Thanks!

3 comments

Log in to comment and vote

Comments3

  • Rikard Nilsson

    •

    Jan 23, 2025

    Hi Arthur, and thank you for your feedback!

    This is a common request, and something we are considering for a future improvement.

    As a workaround, as long as you use Browser or Multistep checks, you can use a check-level environment variable to achieve what you’re looking for.
    - Create an environment variable on the check where you store the degraded reason. See

    https://www.checklyhq.com/docs/browser-checks/variables/ for info on how to use check level variables.
    - You can then refer to this variable when using a webhook alert:

    https://www.checklyhq.com/docs/alerting-and-retries/webhooks/#using-variables

    This solution isn’t perfect, as it can break by accidentally using the same variable name on a global level, causing the alert to pick up different information. Still, it might work for you, depending on your setup.

    Cheers,
    Rikard