checkly-cli icon indicating copy to clipboard operation
checkly-cli copied to clipboard

bug: checkly trigger does not send an alert in case of failure

Open ducatore opened this issue 3 months ago • 4 comments

Node.js version

22

NPM version

10

@checkly/cli version

6.15

Steps to reproduce

  • create a check returning a failure
  • set a Slack alert channel to receive alerts in case of failure
  • run checkly trigger
  • no alert is sent to the Slack channel and nothing in the run results panel of the check

What is expected?

I expect to receive an alert in the Slack channel I configured

What is actually happening?

When I run the tests with checkly test or when the check is ran at a scheduled time the alert is received in Slack channel. I expect to have the same behavior when I ran checkly trigger

Any additional comments?

My use case is to run the checks after a deployment has been done.

ducatore avatar Sep 08 '25 16:09 ducatore

Unfortunately test sessions (which the trigger command uses) were designed for a use case where you start the test session, wait for it to complete, retrieve the result and perform - by yourself - any action you may want to happen based on the result. They do not currently have the capability to trigger alerts by design. That is not to say we would never do it, but it is currently functioning as intended.

You may want to read https://feedback.checklyhq.com/p/fire-alerts-from-triggers for some additional context.

We have a couple APIs coming out soon that may address your use case. One of them will be able to perform the equivalent of npx checkly trigger, but it will suffer from the same limitations - no alerts. Another will allow you to trigger individual checks via an API, much like the Schedule Now button in the UI. This one will produce alerts.

sorccu avatar Sep 08 '25 16:09 sorccu

Ok thanks for your answers.

Any idea when the new APIs will be available?

ducatore avatar Sep 09 '25 14:09 ducatore

This week.

sorccu avatar Sep 09 '25 14:09 sorccu

I forgot to provide an update here. The Check Session API (equivalent to the schedule now button) is live, but the Test Session API (equivalent to npx checkly trigger) has not been released yet. Written documentation is still pending, but you can find the endpoints at https://api.checklyhq.com/#/Check%20sessions.

sorccu avatar Sep 22 '25 16:09 sorccu