From bc813e8e3c81e24c2c68bfd77c14fa4a36478f13 Mon Sep 17 00:00:00 2001 From: Kieran Langton Date: Tue, 3 Feb 2026 17:57:08 +0000 Subject: [PATCH 1/6] Add UptimeRobot plugin --- .../UptimeRobot/v2/dataStreams/eventLogs.json | 75 ++++ .../v2/dataStreams/latestStates.json | 82 ++++ .../UptimeRobot/v2/dataStreams/monitors.json | 20 + .../v2/dataStreams/responseTimes.json | 68 ++++ .../v2/dataStreams/scripts/eventLogs.js | 14 + .../v2/dataStreams/scripts/latestStates.js | 32 ++ .../v2/dataStreams/scripts/monitors.js | 23 ++ .../v2/dataStreams/scripts/responseTimes.js | 10 + .../Perspectives/monitor.dash.json | 355 ++++++++++++++++++ .../defaultContent/accountOverview.dash.json | 212 +++++++++++ .../UptimeRobot/v2/defaultContent/scopes.json | 46 +++ plugins/UptimeRobot/v2/docs/README.md | 8 + plugins/UptimeRobot/v2/icon.svg | 5 + .../v2/importDefinitions/default.json | 18 + plugins/UptimeRobot/v2/metadata.json | 44 +++ plugins/UptimeRobot/v2/ui.json | 13 + 16 files changed, 1025 insertions(+) create mode 100644 plugins/UptimeRobot/v2/dataStreams/eventLogs.json create mode 100644 plugins/UptimeRobot/v2/dataStreams/latestStates.json create mode 100644 plugins/UptimeRobot/v2/dataStreams/monitors.json create mode 100644 plugins/UptimeRobot/v2/dataStreams/responseTimes.json create mode 100644 plugins/UptimeRobot/v2/dataStreams/scripts/eventLogs.js create mode 100644 plugins/UptimeRobot/v2/dataStreams/scripts/latestStates.js create mode 100644 plugins/UptimeRobot/v2/dataStreams/scripts/monitors.js create mode 100644 plugins/UptimeRobot/v2/dataStreams/scripts/responseTimes.js create mode 100644 plugins/UptimeRobot/v2/defaultContent/Perspectives/monitor.dash.json create mode 100644 plugins/UptimeRobot/v2/defaultContent/accountOverview.dash.json create mode 100644 plugins/UptimeRobot/v2/defaultContent/scopes.json create mode 100644 plugins/UptimeRobot/v2/docs/README.md create mode 100644 plugins/UptimeRobot/v2/icon.svg create mode 100644 plugins/UptimeRobot/v2/importDefinitions/default.json create mode 100644 plugins/UptimeRobot/v2/metadata.json create mode 100644 plugins/UptimeRobot/v2/ui.json diff --git a/plugins/UptimeRobot/v2/dataStreams/eventLogs.json b/plugins/UptimeRobot/v2/dataStreams/eventLogs.json new file mode 100644 index 0000000..c3ea95a --- /dev/null +++ b/plugins/UptimeRobot/v2/dataStreams/eventLogs.json @@ -0,0 +1,75 @@ +{ + "name": "eventLogs", + "displayName": "Event Logs", + "baseDataSourceName": "httpRequestScoped", + "config": { + "httpMethod": "post", + "endpointPath": "getMonitors", + "postBody": { + "format": "json", + "monitors": "{{objects.map((n) => n.monitorId).join('-')}}", + "logs": 1 + }, + "postRequestScript": "eventLogs.js", + "paging": { + "mode": "offset", + "pageSize": { + "realm": "body", + "path": "limit", + "value": "50" + }, + "offset": { + "rowCountIn": { + "realm": "payloadArraySize", + "path": "monitors" + }, + "mode": "row", + "base": "0" + }, + "out": { + "realm": "body", + "path": "offset" + } + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "UptimeRobot HTTP Monitor", + "UptimeRobot Keyword Monitor", + "UptimeRobot Ping Monitor", + "UptimeRobot Port Monitor", + "UptimeRobot Heartbeat Monitor" + ] + } + }, + "metadata": [ + { + "name": "friendly_name", + "displayName": "Monitor", + "shape": "string", + "role": "label" + }, + { + "name": "datetime", + "displayName": "Timestamp", + "shape": "date" + }, + { + "name": "reason.code", + "displayName": "Code", + "shape": "string" + }, + { + "name": "reason.detail", + "displayName": "Message", + "shape": "string" + }, + { + "name": "duration", + "displayName": "Duration", + "shape": "seconds" + } + ] +} diff --git a/plugins/UptimeRobot/v2/dataStreams/latestStates.json b/plugins/UptimeRobot/v2/dataStreams/latestStates.json new file mode 100644 index 0000000..b558005 --- /dev/null +++ b/plugins/UptimeRobot/v2/dataStreams/latestStates.json @@ -0,0 +1,82 @@ +{ + "name": "latestStates", + "displayName": "Latest States", + "baseDataSourceName": "httpRequestScoped", + "config": { + "httpMethod": "post", + "endpointPath": "getMonitors", + "postBody": { + "format": "json", + "monitors": "{{objects.map((n) => n.monitorId).join('-')}}" + }, + "postRequestScript": "latestStates.js", + "paging": { + "mode": "offset", + "pageSize": { + "realm": "body", + "path": "limit", + "value": "50" + }, + "offset": { + "rowCountIn": { + "realm": "payloadArraySize", + "path": "monitors" + }, + "mode": "row", + "base": "0" + }, + "out": { + "realm": "body", + "path": "offset" + } + } + }, + "timeframes": false, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "UptimeRobot HTTP Monitor", + "UptimeRobot Keyword Monitor", + "UptimeRobot Ping Monitor", + "UptimeRobot Port Monitor", + "UptimeRobot Heartbeat Monitor" + ] + } + }, + "metadata": [ + { + "name": "state", + "displayName": "State", + "shape": "state" + }, + { + "name": "friendly_name", + "displayName": "Friendly Name", + "visible": false, + "shape": "string", + "role": "label" + }, + { + "name": "link", + "displayName": "Monitor", + "shape": [ + "url", + { + "label": "{{column.friendly_name}}" + } + ] + }, + { + "name": "id", + "displayName": "ID", + "shape": "string", + "role": "id" + }, + { + "name": "status", + "displayName": "Status", + "shape": "string" + } + ] +} diff --git a/plugins/UptimeRobot/v2/dataStreams/monitors.json b/plugins/UptimeRobot/v2/dataStreams/monitors.json new file mode 100644 index 0000000..7a1b265 --- /dev/null +++ b/plugins/UptimeRobot/v2/dataStreams/monitors.json @@ -0,0 +1,20 @@ +{ + "name": "monitors", + "displayName": "Monitors", + "baseDataSourceName": "httpRequestUnscoped", + "config": { + "httpMethod": "post", + "endpointPath": "getMonitors", + "postBody": { + "format": "json" + }, + "postRequestScript": "monitors.js", + "getArgs": [], + "headers": [] + }, + "manualConfigApply": true, + "matches": "none", + "rowPath": [], + "metadata": [], + "timeframes": false +} diff --git a/plugins/UptimeRobot/v2/dataStreams/responseTimes.json b/plugins/UptimeRobot/v2/dataStreams/responseTimes.json new file mode 100644 index 0000000..089e7ad --- /dev/null +++ b/plugins/UptimeRobot/v2/dataStreams/responseTimes.json @@ -0,0 +1,68 @@ +{ + "name": "responseTimes", + "displayName": "Response Times", + "baseDataSourceName": "httpRequestScoped", + "config": { + "httpMethod": "post", + "endpointPath": "getMonitors", + "postBody": { + "format": "json", + "monitors": "{{objects.map((n) => n.monitorId).join('-')}}", + "response_times_end_date": "{{timeframe.unixEnd}}", + "response_times_start_date": "{{timeframe.unixStart}}", + "response_times": 1 + }, + "postRequestScript": "responseTimes.js", + "paging": { + "mode": "offset", + "pageSize": { + "realm": "body", + "path": "limit", + "value": "50" + }, + "offset": { + "rowCountIn": { + "realm": "payloadArraySize", + "path": "monitors" + }, + "mode": "row", + "base": "0" + }, + "out": { + "realm": "body", + "path": "offset" + } + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "UptimeRobot HTTP Monitor", + "UptimeRobot Keyword Monitor", + "UptimeRobot Ping Monitor", + "UptimeRobot Port Monitor", + "UptimeRobot Heartbeat Monitor" + ] + } + }, + "metadata": [ + { + "name": "friendly_name", + "displayName": "Monitor", + "shape": "string", + "role": "label" + }, + { + "name": "datetime", + "displayName": "Timestamp", + "shape": "date" + }, + { + "name": "value", + "displayName": "Average Response", + "shape": "milliseconds", + "role": "value" + } + ] +} diff --git a/plugins/UptimeRobot/v2/dataStreams/scripts/eventLogs.js b/plugins/UptimeRobot/v2/dataStreams/scripts/eventLogs.js new file mode 100644 index 0000000..7b592ca --- /dev/null +++ b/plugins/UptimeRobot/v2/dataStreams/scripts/eventLogs.js @@ -0,0 +1,14 @@ +const startTime = parseInt('{{timeframe.unixStart}}'); +const endTime = parseInt('{{timeframe.unixEnd}}'); + +const eventLogs = data.monitors + .map((result) => { + return result.logs.map((row) => ({ + ...row, + friendly_name: result.friendly_name + })); + }) + .flat() + .filter((row) => row.datetime >= startTime && row.datetime <= endTime); + +result = eventLogs; diff --git a/plugins/UptimeRobot/v2/dataStreams/scripts/latestStates.js b/plugins/UptimeRobot/v2/dataStreams/scripts/latestStates.js new file mode 100644 index 0000000..7281913 --- /dev/null +++ b/plugins/UptimeRobot/v2/dataStreams/scripts/latestStates.js @@ -0,0 +1,32 @@ +const getType = (value) => ({ + 1: 'UptimeRobot HTTP Monitor', + 2: 'UptimeRobot Keyword Monitor', + 3: 'UptimeRobot Ping Monitor', + 4: 'UptimeRobot Port Monitor', + 5: 'UptimeRobot Heartbeat Monitor' +})[value]; + +const getStatus = (value) => ({ + 0: 'Paused', + 1: 'Not Checked Yet', + 2: 'Up', + 8: 'Seems Down', + 9: 'Down' +})[value]; + +const getState = (value) => ({ + 0: 'unknown', + 1: 'unknown', + 2: 'success', + 8: 'warning', + 9: 'error' +})[value]; + +result = data.monitors.map((result) => ({ + ...result, + id: result.id.toString(), + link: `https://uptimerobot.com/dashboard?ref=website-header#${result.id}`, + status: getStatus(result.status), + state: getState(result.status), + type: getType(result.type) +}));; diff --git a/plugins/UptimeRobot/v2/dataStreams/scripts/monitors.js b/plugins/UptimeRobot/v2/dataStreams/scripts/monitors.js new file mode 100644 index 0000000..febcf42 --- /dev/null +++ b/plugins/UptimeRobot/v2/dataStreams/scripts/monitors.js @@ -0,0 +1,23 @@ +const sourceName = 'UptimeRobot'; + +const type = (value) => ({ + 1: 'UptimeRobot HTTP Monitor', + 2: 'UptimeRobot Keyword Monitor', + 3: 'UptimeRobot Ping Monitor', + 4: 'UptimeRobot Port Monitor', + 5: 'UptimeRobot Heartbeat Monitor' +})[value]; + +result = data.monitors.map((monitor) => ({ + links: [{ + label: 'View in UptimeRobot', + url: `https://uptimerobot.com/dashboard?ref=website-header#${monitor.id}` + }], + monitorUrl: monitor.url, + name: monitor.friendly_name, + sourceName: sourceName, + sourceType: type(monitor.type), + sourceId: monitor.id.toString(), + monitorId: monitor.id.toString(), + type: 'monitor' +})); diff --git a/plugins/UptimeRobot/v2/dataStreams/scripts/responseTimes.js b/plugins/UptimeRobot/v2/dataStreams/scripts/responseTimes.js new file mode 100644 index 0000000..e443f70 --- /dev/null +++ b/plugins/UptimeRobot/v2/dataStreams/scripts/responseTimes.js @@ -0,0 +1,10 @@ +const responseTimes = data?.monitors + ?.map((result) => { + return result.response_times.map((row) => ({ + ...row, + friendly_name: result.friendly_name + })); + }) + .flat(); + +result = responseTimes; diff --git a/plugins/UptimeRobot/v2/defaultContent/Perspectives/monitor.dash.json b/plugins/UptimeRobot/v2/defaultContent/Perspectives/monitor.dash.json new file mode 100644 index 0000000..6434645 --- /dev/null +++ b/plugins/UptimeRobot/v2/defaultContent/Perspectives/monitor.dash.json @@ -0,0 +1,355 @@ +{ + "dashboard": { + "_type": "layout/grid", + "columns": 5, + "contents": [ + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "id": "{{dataStreams.[latestStates]}}", + "name": "latestStates" + }, + "description": "", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "timeframe": "none", + "title": "Latest State", + "variables": [ + "{{variables.[UptimeRobot Monitor]}}" + ], + "visualisation": { + "config": { + "data-stream-blocks": { + "labelColumn": "status", + "linkColumn": "link", + "stateColumn": "state" + } + }, + "type": "data-stream-blocks" + } + }, + "h": 2, + "i": "faed9e20-ab05-4493-b824-a4c109486c22", + "moved": false, + "static": false, + "w": 1, + "x": 0, + "y": 0, + "z": 0 + }, + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "description": "", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "timeframe": "none", + "title": "Properties", + "variables": [ + "{{variables.[UptimeRobot Monitor]}}" + ], + "visualisation": { + "config": { + "data-stream-table": { + "columnDisplayNames": { + "sourceType": "Type" + }, + "columnOrder": [ + "name", + "sourceId", + "monitorUrl", + "sourceType" + ], + "hiddenColumns": [ + "id", + "sourceName", + "link", + "links", + "type", + "label" + ], + "transpose": true + } + }, + "type": "data-stream-table" + } + }, + "h": 2, + "i": "13116b80-3dbe-424f-873a-43102585c8a3", + "moved": false, + "static": false, + "w": 2, + "x": 1, + "y": 0, + "z": 0 + }, + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "filter": { + "filters": [ + { + "column": "reason.code", + "operation": "greaterthan", + "value": "500" + }, + { + "column": "reason.code", + "operation": "lessthan", + "value": "599" + } + ], + "multiOperation": "and" + }, + "group": { + "aggregate": [ + { + "names": [ + "duration" + ], + "type": "sum" + } + ], + "by": [ + ] + }, + "id": "{{dataStreams.[eventLogs]}}", + "metadata": [ + { + "name": "reason.code", + "shape": [ + "number", + { + "decimalPlaces": 0 + } + ] + } + ], + "name": "eventLogs" + }, + "description": "5xx error codes only", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "timeframe": "last30days", + "title": "Downtime Last 30 Days", + "variables": [ + "{{variables.[UptimeRobot Monitor]}}" + ], + "visualisation": { + "config": { + "data-stream-scalar": { + "comparisonColumn": "none", + "value": "duration_sum" + } + }, + "type": "data-stream-scalar" + } + }, + "h": 2, + "i": "2951643d-585b-47f4-a0cc-b0ff5796556c", + "moved": false, + "static": false, + "w": 2, + "x": 3, + "y": 0, + "z": 0 + }, + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "group": { + "aggregate": [ + { + "names": [ + "value" + ], + "type": "median" + } + ] + }, + "id": "{{dataStreams.[responseTimes]}}", + "name": "responseTimes" + }, + "description": "", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "title": "Average", + "variables": [ + "{{variables.[UptimeRobot Monitor]}}" + ], + "visualisation": { + "type": "data-stream-scalar" + } + }, + "h": 1, + "i": "03f4e90c-e7df-4189-bca1-2d0c99341388", + "moved": false, + "static": false, + "w": 1, + "x": 4, + "y": 2, + "z": 0 + }, + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "id": "{{dataStreams.[responseTimes]}}", + "metadata": [ + { + "name": "value", + "shape": [ + "milliseconds", + { + "decimalPlaces": 0, + "formatDuration": false + } + ] + } + ], + "name": "responseTimes" + }, + "description": "", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "title": "Response Time", + "variables": [ + "{{variables.[UptimeRobot Monitor]}}" + ], + "visualisation": { + "config": { + "data-stream-line-graph": { + "legendPosition": "bottom", + "seriesColumn": "friendly_name", + "showLegend": false, + "showTrendLine": true, + "showYAxisLabel": false, + "xAxisColumn": "datetime", + "yAxisColumn": "value", + "yAxisLabel": "Response time" + } + }, + "type": "data-stream-line-graph" + } + }, + "h": 3, + "i": "44e5d5f8-f984-4c41-a6b1-fdf3af77f3e6", + "moved": false, + "static": false, + "w": 4, + "x": 0, + "y": 2, + "z": 0 + }, + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "group": { + "aggregate": [ + { + "names": [ + "value" + ], + "type": "max" + } + ] + }, + "id": "{{dataStreams.[responseTimes]}}", + "name": "responseTimes" + }, + "description": "", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "title": "Max", + "variables": [ + "{{variables.[UptimeRobot Monitor]}}" + ], + "visualisation": { + "type": "data-stream-scalar" + } + }, + "h": 1, + "i": "775ad3b7-3466-412a-b4bb-c5fd5c5d1cd0", + "moved": false, + "static": false, + "w": 1, + "x": 4, + "y": 3, + "z": 0 + }, + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "group": { + "aggregate": [ + { + "names": [ + "value" + ], + "type": "min" + } + ], + "by": [ + ] + }, + "id": "{{dataStreams.[responseTimes]}}", + "name": "responseTimes" + }, + "description": "", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "title": "Min", + "variables": [ + "{{variables.[UptimeRobot Monitor]}}" + ], + "visualisation": { + "config": { + "data-stream-scalar": { + "value": "value_min" + } + }, + "type": "data-stream-scalar" + } + }, + "h": 1, + "i": "ff1ad29b-897d-429d-bebe-d3fcdf941e44", + "moved": false, + "static": false, + "w": 1, + "x": 4, + "y": 4, + "z": 0 + } + ], + "version": 184 + }, + "name": "Monitor", + "schemaVersion": "1.4", + "timeframe": "last7days", + "variables": [ + "{{variables.[UptimeRobot Monitor]}}" + ] +} diff --git a/plugins/UptimeRobot/v2/defaultContent/accountOverview.dash.json b/plugins/UptimeRobot/v2/defaultContent/accountOverview.dash.json new file mode 100644 index 0000000..7e81db6 --- /dev/null +++ b/plugins/UptimeRobot/v2/defaultContent/accountOverview.dash.json @@ -0,0 +1,212 @@ +{ + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "contents": [ + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "group": { + "aggregate": [ + { + "type": "count" + } + ], + "by": [ + "state", + "uniqueValues" + ] + }, + "id": "{{dataStreams.[latestStates]}}", + "name": "latestStates" + }, + "description": "", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "timeframe": "none", + "title": "Current State", + "visualisation": { + "config": { + "data-stream-donut-chart": { + "labelColumn": "state_uniqueValues", + "legendMode": "table", + "legendPosition": "right", + "showValuesAsPercentage": false, + "valueColumn": "state" + } + }, + "type": "data-stream-donut-chart" + } + }, + "h": 2, + "i": "2db64afe-3537-43ff-9ca2-9332dc9a228c", + "moved": false, + "static": false, + "w": 2, + "x": 2, + "y": 0, + "z": 0 + }, + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "id": "datastream-properties", + "metadata": [ + { + "name": "link", + "shape": [ + "url", + { + "label": "{{{{raw}}}}{{column.name}}{{{{/raw}}}}" + } + ] + } + ], + "name": "properties" + }, + "description": "", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "timeframe": "none", + "title": "", + "visualisation": { + "config": { + "data-stream-scalar": { + "comparisonColumn": "none", + "label": "Monitors", + "value": { + "type": "count" + } + } + }, + "type": "data-stream-scalar" + } + }, + "h": 2, + "i": "6d1e1c65-b993-4a22-b44f-de3598651997", + "moved": false, + "static": false, + "w": 2, + "x": 0, + "y": 0, + "z": 0 + }, + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "id": "datastream-properties", + "metadata": [ + { + "name": "link", + "shape": [ + "url", + { + "label": "{{{{raw}}}}{{column.name}}{{{{/raw}}}}" + } + ] + } + ], + "name": "properties" + }, + "description": "", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "timeframe": "none", + "title": "Monitors", + "visualisation": { + "config": { + "data-stream-table": { + "columnDisplayNames": { + "link": "Name" + }, + "columnOrder": [ + "link", + "sourceType" + ], + "hiddenColumns": [ + "id", + "label", + "type", + "sourceId", + "sourceName", + "links", + "name", + "monitorUrl" + ] + } + }, + "type": "data-stream-table" + } + }, + "h": 4, + "i": "4a441b11-1234-4156-b318-6cdc1c4ee5bd", + "moved": false, + "static": false, + "w": 2, + "x": 0, + "y": 2, + "z": 0 + }, + { + "config": { + "_type": "tile/data-stream", + "dataStream": { + "filter": { + "filters": [ + { + "column": "state", + "operation": "equals", + "value": "error" + } + ], + "multiOperation": "and" + }, + "id": "{{dataStreams.[latestStates]}}", + "name": "latestStates" + }, + "description": "", + "scope": { + "scope": "{{scopes.[UptimeRobot Monitors]}}", + "workspace": "{{workspaceId}}" + }, + "timeframe": "none", + "title": "Monitors Down", + "visualisation": { + "config": { + "data-stream-blocks": { + "columns": 1, + "labelColumn": "link", + "linkColumn": "link", + "stateColumn": "state", + "sublabel": "status" + } + }, + "type": "data-stream-blocks" + } + }, + "h": 4, + "i": "7ea0a324-8975-4a2b-8c07-fd132e6c47e4", + "moved": false, + "static": false, + "w": 2, + "x": 2, + "y": 2, + "z": 0 + } + ], + "version": 92 + }, + "name": "Account Overview", + "schemaVersion": "1.4", + "variables": [ + ] +} \ No newline at end of file diff --git a/plugins/UptimeRobot/v2/defaultContent/scopes.json b/plugins/UptimeRobot/v2/defaultContent/scopes.json new file mode 100644 index 0000000..37726cb --- /dev/null +++ b/plugins/UptimeRobot/v2/defaultContent/scopes.json @@ -0,0 +1,46 @@ +[ + { + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "UptimeRobot HTTP Monitor", + "UptimeRobot Keyword Monitor", + "UptimeRobot Ping Monitor", + "UptimeRobot Port Monitor", + "UptimeRobot Heartbeat Monitor", + "monitor" + ] + } + }, + "name": "Monitors", + "variable": { + "allowMultipleSelection": false, + "default": "none", + "name": "Monitor", + "type": "object" + } + }, + { + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "UptimeRobot HTTP Monitor", + "UptimeRobot Keyword Monitor", + "UptimeRobot Ping Monitor", + "UptimeRobot Port Monitor", + "UptimeRobot Heartbeat Monitor", + "monitor" + ] + } + }, + "name": "UptimeRobot Monitors", + "variable": { + "allowMultipleSelection": false, + "default": "none", + "name": "UptimeRobot Monitor", + "type": "object" + } + } +] \ No newline at end of file diff --git a/plugins/UptimeRobot/v2/docs/README.md b/plugins/UptimeRobot/v2/docs/README.md new file mode 100644 index 0000000..a7f07ed --- /dev/null +++ b/plugins/UptimeRobot/v2/docs/README.md @@ -0,0 +1,8 @@ +# UptimeRobot + +To obtain your UptimeRobot Read-Only API Key: + +1. Log in to your UptimeRobot account at https://uptimerobot.com +2. Navigate to **Settings** > **API** +3. Under "Read-Only API Key", copy the key displayed +4. Paste it into the API key field \ No newline at end of file diff --git a/plugins/UptimeRobot/v2/icon.svg b/plugins/UptimeRobot/v2/icon.svg new file mode 100644 index 0000000..d7ca4e1 --- /dev/null +++ b/plugins/UptimeRobot/v2/icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/plugins/UptimeRobot/v2/importDefinitions/default.json b/plugins/UptimeRobot/v2/importDefinitions/default.json new file mode 100644 index 0000000..cdcc2e1 --- /dev/null +++ b/plugins/UptimeRobot/v2/importDefinitions/default.json @@ -0,0 +1,18 @@ +{ + "steps": [ + { + "name": "monitors", + "dataStream": { + "name": "monitors", + "dataSourceConfig": {} + }, + "timeframe": "none", + "objectMapping": { + "id": "sourceId", + "name": "name", + "type": { "column": "sourceType" }, + "properties": ["type", "monitorId", "monitorUrl", "name", "links"] + } + } + ] +} diff --git a/plugins/UptimeRobot/v2/metadata.json b/plugins/UptimeRobot/v2/metadata.json new file mode 100644 index 0000000..6b5c5ed --- /dev/null +++ b/plugins/UptimeRobot/v2/metadata.json @@ -0,0 +1,44 @@ +{ + "name": "UptimeRobot", + "displayName": "UptimeRobot", + "version": "2.0.1", + "author": { + "name": "@kieranlangton", + "type": "community" + }, + "description": "Monitor the availability and performance of your services from your UptimeRobot environment.", + "category": "Monitoring", + "type": "cloud", + "restrictedToPlatforms": [], + "importNotSupported": false, + "schemaVersion": "2.0", + "base": { + "plugin": "WebAPI", + "majorVersion": "1", + "config": { + "authMode": "none", + "queryArgs": [ + { + "value": "{{apiKey}}", + "key": "api_key" + } + ], + "headers": [], + "baseUrl": "https://api.uptimerobot.com/v2/" + } + }, + "links": [ + { + "category": "documentation", + "url": "https://github.com/squaredup/plugins/blob/main/plugins/UptimeRobot/v2/docs/README.md", + "label": "Help adding this plugin" + }, + { + "category": "source", + "url": "https://github.com/squaredup/plugins/tree/main/plugins/UptimeRobot/v2", + "label": "Repository" + } + ], + "keywords": ["state", "monitoring", "remote", "pingdom", "url", "test", "response", "state", "rum", "user"], + "objectTypes": ["Heartbeat Monitor", "HTTP Monitor", "Keyword Monitor", "Ping Monitor", "Port Monitor"] +} diff --git a/plugins/UptimeRobot/v2/ui.json b/plugins/UptimeRobot/v2/ui.json new file mode 100644 index 0000000..4cbeee6 --- /dev/null +++ b/plugins/UptimeRobot/v2/ui.json @@ -0,0 +1,13 @@ +[ + { + "type": "password", + "name": "apiKey", + "label": "API key", + "title": "API Key", + "help": "Provide an API key for your UptimeRobot account", + "validation": { + "required": true + }, + "placeholder": "Enter an API key (read-only recommended)" + } +] \ No newline at end of file From 3c70c95358ac5d9dea97d8e541d5f5652ef0ef75 Mon Sep 17 00:00:00 2001 From: Kieran Langton Date: Wed, 4 Feb 2026 09:42:35 +0000 Subject: [PATCH 2/6] PR feedback --- plugins/UptimeRobot/v2/dataStreams/scripts/latestStates.js | 2 +- plugins/UptimeRobot/v2/dataStreams/scripts/responseTimes.js | 4 ++-- plugins/UptimeRobot/v2/ui.json | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/UptimeRobot/v2/dataStreams/scripts/latestStates.js b/plugins/UptimeRobot/v2/dataStreams/scripts/latestStates.js index 7281913..aa1ae82 100644 --- a/plugins/UptimeRobot/v2/dataStreams/scripts/latestStates.js +++ b/plugins/UptimeRobot/v2/dataStreams/scripts/latestStates.js @@ -29,4 +29,4 @@ result = data.monitors.map((result) => ({ status: getStatus(result.status), state: getState(result.status), type: getType(result.type) -}));; +})); diff --git a/plugins/UptimeRobot/v2/dataStreams/scripts/responseTimes.js b/plugins/UptimeRobot/v2/dataStreams/scripts/responseTimes.js index e443f70..6c32b14 100644 --- a/plugins/UptimeRobot/v2/dataStreams/scripts/responseTimes.js +++ b/plugins/UptimeRobot/v2/dataStreams/scripts/responseTimes.js @@ -1,5 +1,5 @@ -const responseTimes = data?.monitors - ?.map((result) => { +const responseTimes = (data?.monitors || []) + .map((result) => { return result.response_times.map((row) => ({ ...row, friendly_name: result.friendly_name diff --git a/plugins/UptimeRobot/v2/ui.json b/plugins/UptimeRobot/v2/ui.json index 4cbeee6..bd3b408 100644 --- a/plugins/UptimeRobot/v2/ui.json +++ b/plugins/UptimeRobot/v2/ui.json @@ -3,11 +3,10 @@ "type": "password", "name": "apiKey", "label": "API key", - "title": "API Key", "help": "Provide an API key for your UptimeRobot account", "validation": { "required": true }, - "placeholder": "Enter an API key (read-only recommended)" + "placeholder": "Enter UptimeRobot API key (read-only recommended)" } ] \ No newline at end of file From 61d0cf5ba64f1177ed72107c1c74b0bd56062e0c Mon Sep 17 00:00:00 2001 From: Kieran Langton Date: Wed, 4 Feb 2026 10:31:16 +0000 Subject: [PATCH 3/6] Hide data stream used for import --- plugins/UptimeRobot/v2/dataStreams/monitors.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/UptimeRobot/v2/dataStreams/monitors.json b/plugins/UptimeRobot/v2/dataStreams/monitors.json index 7a1b265..9eebae3 100644 --- a/plugins/UptimeRobot/v2/dataStreams/monitors.json +++ b/plugins/UptimeRobot/v2/dataStreams/monitors.json @@ -12,6 +12,9 @@ "getArgs": [], "headers": [] }, + "visibility": { + "type": "hidden" + }, "manualConfigApply": true, "matches": "none", "rowPath": [], From 4f8c96a849e5d6e799bebf6bbcb4c33f1867044f Mon Sep 17 00:00:00 2001 From: Kieran Langton Date: Wed, 4 Feb 2026 10:37:27 +0000 Subject: [PATCH 4/6] Move perspective default content dashboard from folder --- plugins/UptimeRobot/v2/defaultContent/manifest.json | 12 ++++++++++++ .../{Perspectives => }/monitor.dash.json | 0 2 files changed, 12 insertions(+) create mode 100644 plugins/UptimeRobot/v2/defaultContent/manifest.json rename plugins/UptimeRobot/v2/defaultContent/{Perspectives => }/monitor.dash.json (100%) diff --git a/plugins/UptimeRobot/v2/defaultContent/manifest.json b/plugins/UptimeRobot/v2/defaultContent/manifest.json new file mode 100644 index 0000000..0c3dea4 --- /dev/null +++ b/plugins/UptimeRobot/v2/defaultContent/manifest.json @@ -0,0 +1,12 @@ +{ + "items": [ + { + "name": "accountOverview", + "type": "dashboard" + }, + { + "name": "monitor", + "type": "dashboard" + } + ] +} \ No newline at end of file diff --git a/plugins/UptimeRobot/v2/defaultContent/Perspectives/monitor.dash.json b/plugins/UptimeRobot/v2/defaultContent/monitor.dash.json similarity index 100% rename from plugins/UptimeRobot/v2/defaultContent/Perspectives/monitor.dash.json rename to plugins/UptimeRobot/v2/defaultContent/monitor.dash.json From 9830885b46ec7dd78535113d6c780313781976e7 Mon Sep 17 00:00:00 2001 From: Kieran Langton Date: Wed, 4 Feb 2026 11:14:15 +0000 Subject: [PATCH 5/6] Update readme --- plugins/UptimeRobot/v2/docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UptimeRobot/v2/docs/README.md b/plugins/UptimeRobot/v2/docs/README.md index a7f07ed..0b48bce 100644 --- a/plugins/UptimeRobot/v2/docs/README.md +++ b/plugins/UptimeRobot/v2/docs/README.md @@ -1,4 +1,4 @@ -# UptimeRobot +# Before you start To obtain your UptimeRobot Read-Only API Key: From 7a167c3566c79a7e0a6ff24cc9946b828a7f12f5 Mon Sep 17 00:00:00 2001 From: Kieran Langton Date: Thu, 5 Feb 2026 09:20:42 +0000 Subject: [PATCH 6/6] Add missing variable reference to OOB scopes --- .../v2/defaultContent/monitor.dash.json | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/plugins/UptimeRobot/v2/defaultContent/monitor.dash.json b/plugins/UptimeRobot/v2/defaultContent/monitor.dash.json index 6434645..00e7dff 100644 --- a/plugins/UptimeRobot/v2/defaultContent/monitor.dash.json +++ b/plugins/UptimeRobot/v2/defaultContent/monitor.dash.json @@ -13,7 +13,8 @@ "description": "", "scope": { "scope": "{{scopes.[UptimeRobot Monitors]}}", - "workspace": "{{workspaceId}}" + "workspace": "{{workspaceId}}", + "variable": "{{variables.[UptimeRobot Monitor]}}" }, "timeframe": "none", "title": "Latest State", @@ -50,7 +51,8 @@ "description": "", "scope": { "scope": "{{scopes.[UptimeRobot Monitors]}}", - "workspace": "{{workspaceId}}" + "workspace": "{{workspaceId}}", + "variable": "{{variables.[UptimeRobot Monitor]}}" }, "timeframe": "none", "title": "Properties", @@ -140,7 +142,8 @@ "description": "5xx error codes only", "scope": { "scope": "{{scopes.[UptimeRobot Monitors]}}", - "workspace": "{{workspaceId}}" + "workspace": "{{workspaceId}}", + "variable": "{{variables.[UptimeRobot Monitor]}}" }, "timeframe": "last30days", "title": "Downtime Last 30 Days", @@ -186,7 +189,8 @@ "description": "", "scope": { "scope": "{{scopes.[UptimeRobot Monitors]}}", - "workspace": "{{workspaceId}}" + "workspace": "{{workspaceId}}", + "variable": "{{variables.[UptimeRobot Monitor]}}" }, "title": "Average", "variables": [ @@ -227,7 +231,8 @@ "description": "", "scope": { "scope": "{{scopes.[UptimeRobot Monitors]}}", - "workspace": "{{workspaceId}}" + "workspace": "{{workspaceId}}", + "variable": "{{variables.[UptimeRobot Monitor]}}" }, "title": "Response Time", "variables": [ @@ -278,7 +283,8 @@ "description": "", "scope": { "scope": "{{scopes.[UptimeRobot Monitors]}}", - "workspace": "{{workspaceId}}" + "workspace": "{{workspaceId}}", + "variable": "{{variables.[UptimeRobot Monitor]}}" }, "title": "Max", "variables": [ @@ -319,7 +325,8 @@ "description": "", "scope": { "scope": "{{scopes.[UptimeRobot Monitors]}}", - "workspace": "{{workspaceId}}" + "workspace": "{{workspaceId}}", + "variable": "{{variables.[UptimeRobot Monitor]}}" }, "title": "Min", "variables": [