Skip to main content

Alerting

There are two kinds of "tell me when something happens", and they need different plumbing. Cobblr can notify you about things that happen inside a workspace. Telling you the box itself is down has to come from outside the box, because a down instance cannot send its own alarm.

Is the instance up: watch from outside

To find out the api stopped responding, something that is not the api has to check it. Point an uptime monitor at the health endpoint:

http://<your-box>:8088/api/v1/healthz

It returns {"ok": true, ...} while the api is serving (see Health and status). Any uptime service that fetches a URL on an interval and notifies on failure works: a hosted checker, or a small script on a second machine that curls the endpoint and posts to a webhook when it fails. Run the check from somewhere other than the Cobblr box, so a total outage still reaches you.

A minimal version is a cron job on another machine:

curl -fsS --max-time 10 http://<your-box>:8088/api/v1/healthz > /dev/null \
|| curl -s -X POST -H 'Content-Type: application/json' \
-d '{"content":"Cobblr health check failed"}' \
"$DISCORD_WEBHOOK_URL"

The -f flag makes curl fail on a non-200, so an api that is down (or a box that is unreachable) triggers the notification. A Discord or Slack incoming webhook is the quick target; any webhook URL works.

Things that happen inside a workspace

For events Cobblr itself produces, such as an order arriving or stock dropping below its minimum, use Cobblr's own notifications. Point a Discord or Slack incoming webhook at the matching channel in the app, then choose which events go there. This is per-event, so operational things can go to a channel and the rest can stay in the app. Full setup is in Notifications. These are for workspace activity, not for whether the server is alive; that is the outside check above.

What does not phone home

Cobblr sends nothing on its own. There is no telemetry, no error reporting, and no update check calling out to any service. Every alert described here is one you wire up and point at a destination you control, which is also why the uptime check has to be something you set up rather than something that already exists.