UptimeRobot webhooks: downtime and expiring certificates as signals
Send UptimeRobot's down, up and SSL expiry alerts to Pulso with a JSON body you define, and turn them into signals with an owner and a playbook.
UptimeRobot checks your sites and APIs; Pulso decides what happens next. With a webhook integration, each down, up or expiry alert becomes an event in a Pulso webhook source, and its monitors open signals with the steps to follow.
Connect UptimeRobot#
Webhook integrations are on UptimeRobot’s Team and Scale plans. Add UptimeRobot to Pulso to create a webhook source called UptimeRobot; it shows these steps with the source’s URL and secret, then creates the monitors below that you pick, with their playbooks and a report. To start from scratch instead, create a webhook data source called UptimeRobot.
- In UptimeRobot, go to Integrations, click Add Integration and select Webhook.
- Paste the source’s Endpoint URL,
https://hooks.pulso.run/webhooks/<id>/<token>, as the Webhook URL. - Under Custom headers, add
AuthorizationwithBearer <secret>as its value. The secret is the source’s Signing secret, under Signatures with the Bearer token scheme: Add to Pulso makes one up and refuses deliveries without it; from scratch, set a long random one there. - Under the default variables, don’t send them as a query string: Pulso reads only the body.
- In POST value, paste the body below and turn on Send as JSON (application/json).
- Under Events to notify about, pick Down events, Up events and SSL & Domain expiry, and save.
- Connect the integration to the monitors that should report to Pulso.
UptimeRobot’s API v3 creates the same integration with POST https://api.uptimerobot.com/v3/integrations, "type": "Webhook", the Pulso URL as urlToNotify, "sendAsJSON": true and the body as postValue, and the header in customHeaders.
The body to send#
UptimeRobot fills in variables wrapped in asterisks. This body gives each one a column of its own:
{
"monitor_id": "*monitorID*",
"monitor": "*monitorFriendlyName*",
"url": "*monitorURL*",
"monitor_type": "*monitorType*",
"alert_type": "*alertType*",
"status": "*alertTypeFriendlyName*",
"details": "*alertDetails*",
"duration_seconds": "*alertDuration*",
"alerted_at": "*alertDateTime*",
"incident_started_at": "*incidentStartTime*",
"incident_ended_at": "*incidentEndTime*",
"http_status_code": "*httpStatusCode*",
"regions": "*monitoringRegions*",
"tags": "*monitorTags*",
"group": "*monitorGroup*",
"ssl_expires_on": "*sslExpiryDate*",
"ssl_days_left": "*sslExpiryDaysLeft*",
"domain_expires_on": "*domainExpireDate*",
"dashboard_url": "*dashboardUrl*",
"custom_fields": *customFields*
}
The columns are the keys above: monitor_id, monitor, alert_type, status and so on. alert_type is 1 for down, 2 for up and 3 for an SSL or domain expiry. duration_seconds and incident_ended_at only have a value on up events, the SSL and domain dates only on expiry alerts. custom_fields goes without quotes, as UptimeRobot asks; if it arrives as an object, its keys become columns like custom_fields.team.
Number filters read quoted numbers, so duration_seconds greater than 900 works.
Monitors to build#
A site we sell on is down#
- Filters:
alert_typeequals1. Addtagscontainscheckoutto keep the sites you sell on. - Uniq by:
monitor_idandincident_started_at, one signal per outage. - Playbook: a question, “Customer-facing?”, that decides whether support posts a notice. Add an SMS to the on-call engineer with
{{signal.monitor}},{{signal.details}}and{{signal.dashboard_url}}.
Long outages to review#
- Filters:
alert_typeequals2,duration_secondsgreater than900. - Uniq by:
monitor_idandincident_started_at. - Playbook: a task to write up what happened, due this week, with
{{signal.duration_seconds}}and{{signal.incident_started_at}}.
Certificates about to expire#
- Filters:
alert_typeequals3,ssl_days_leftless than14. - Uniq by:
monitor_idandssl_expires_on, so the next renewal’s alert opens a new signal. - Playbook: a task to renew the certificate for
{{signal.url}}, assigned to whoever owns it, fromcustom_fields.teamif you set one.
UptimeRobot only sends when a monitor changes state, so a heartbeat monitor in Pulso can’t tell a quiet day from a missing alert.
Limits#
- One attempt. UptimeRobot sends down and up alerts once: a delivery that fails is not retried and nobody is told. Pulso answers as soon as it stores the event.
- No signature. UptimeRobot doesn’t sign its alerts, so the source checks the bearer token in the Authorization header instead; its other custom headers arrive as
http_headerscolumns. - Check the first alert. UptimeRobot doesn’t document how it escapes values in a custom body, or what a variable with no value becomes. A value with a double quote, or an empty
*customFields*, could leave the body invalid JSON, which Pulso refuses with400. Check the first alerts under Recent events, and dropcustom_fieldsif your monitors have none.
Source: UptimeRobot’s Webhook integration article.
Add UptimeRobot to Pulso: a webhook source, 3 monitors with their playbooks and a report, then these steps with the source's URL.
- UptimeRobot monitors down
- UptimeRobot long outages to review
- UptimeRobot certificates about to expire
- Report: UptimeRobot