150 lines
5.8 KiB
Django/Jinja
150 lines
5.8 KiB
Django/Jinja
{
|
|
"id": null,
|
|
"uid": "beepi-uptimerobot",
|
|
"title": "External Checks",
|
|
"tags": ["beepi", "uptimerobot"],
|
|
"timezone": "browser",
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "5m",
|
|
"time": {"from": "now-24h", "to": "now"},
|
|
"panels": [
|
|
{
|
|
"type": "stat",
|
|
"title": "Monitors down",
|
|
"id": 1,
|
|
"gridPos": {"h": 5, "w": 6, "x": 0, "y": 0},
|
|
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
|
"type": "json",
|
|
"source": "url",
|
|
"parser": "backend",
|
|
"format": "table",
|
|
"url": "https://api.uptimerobot.com/v2/getMonitors?format=json&custom_uptime_ratios=1-7-30",
|
|
"url_options": {"method": "POST", "data": ""},
|
|
"root_selector": "monitors",
|
|
"columns": [
|
|
{"selector": "friendly_name", "text": "Monitor", "type": "string"},
|
|
{"selector": "status", "text": "Status", "type": "number"}
|
|
],
|
|
"filterExpression": "status == 8 || status == 9"
|
|
}
|
|
],
|
|
"transformations": [{"id": "reduce", "options": {"reducers": ["count"]}}],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "red", "value": 1}]},
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"textMode": "value",
|
|
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "/^Status$/", "values": false}
|
|
}
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "UptimeRobot monitors",
|
|
"id": 2,
|
|
"gridPos": {"h": 12, "w": 18, "x": 6, "y": 0},
|
|
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
|
"type": "json",
|
|
"source": "url",
|
|
"parser": "backend",
|
|
"format": "table",
|
|
"url": "https://api.uptimerobot.com/v2/getMonitors?format=json&custom_uptime_ratios=1-7-30",
|
|
"url_options": {"method": "POST", "data": ""},
|
|
"root_selector": "monitors",
|
|
"columns": [
|
|
{"selector": "friendly_name", "text": "Monitor", "type": "string"},
|
|
{"selector": "status", "text": "Status", "type": "number"},
|
|
{"selector": "custom_uptime_ratio", "text": "Uptime 1d-7d-30d", "type": "string"},
|
|
{"selector": "interval", "text": "Interval", "type": "number"},
|
|
{"selector": "url", "text": "URL", "type": "string"}
|
|
]
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {"custom": {"align": "auto", "cellOptions": {"type": "auto"}}},
|
|
"overrides": [
|
|
{
|
|
"matcher": {"id": "byName", "options": "Status"},
|
|
"properties": [
|
|
{"id": "custom.cellOptions", "value": {"type": "color-background"}},
|
|
{"id": "mappings", "value": [{"type": "value", "options": {
|
|
"0": {"text": "paused", "color": "text", "index": 0},
|
|
"1": {"text": "not checked", "color": "blue", "index": 1},
|
|
"2": {"text": "UP", "color": "green", "index": 2},
|
|
"8": {"text": "SEEMS DOWN", "color": "orange", "index": 3},
|
|
"9": {"text": "DOWN", "color": "red", "index": 4}
|
|
}}]},
|
|
{"id": "custom.width", "value": 130}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {"id": "byName", "options": "Interval"},
|
|
"properties": [{"id": "unit", "value": "s"}, {"id": "custom.width", "value": 100}]
|
|
},
|
|
{
|
|
"matcher": {"id": "byName", "options": "Uptime 1d-7d-30d"},
|
|
"properties": [{"id": "custom.width", "value": 190}]
|
|
}
|
|
]
|
|
},
|
|
"options": {"showHeader": true, "sortBy": [{"displayName": "Status", "desc": true}]}
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Monitors configured",
|
|
"id": 3,
|
|
"gridPos": {"h": 5, "w": 6, "x": 0, "y": 5},
|
|
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {"type": "yesoreyeram-infinity-datasource", "uid": "{{ grafana_uptimerobot_uid }}"},
|
|
"type": "json",
|
|
"source": "url",
|
|
"parser": "backend",
|
|
"format": "table",
|
|
"url": "https://api.uptimerobot.com/v2/getMonitors?format=json",
|
|
"url_options": {"method": "POST", "data": ""},
|
|
"root_selector": "monitors",
|
|
"columns": [{"selector": "status", "text": "Status", "type": "number"}]
|
|
}
|
|
],
|
|
"transformations": [{"id": "reduce", "options": {"reducers": ["count"]}}],
|
|
"fieldConfig": {
|
|
"defaults": {"color": {"mode": "fixed", "fixedColor": "blue"}, "unit": "short"},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"textMode": "value",
|
|
"reduceOptions": {"calcs": ["lastNotNull"], "fields": "/^Status$/", "values": false}
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"title": "About",
|
|
"id": 4,
|
|
"gridPos": {"h": 4, "w": 24, "x": 0, "y": 12},
|
|
"options": {
|
|
"mode": "markdown",
|
|
"content": "External reachability is checked by UptimeRobot from outside the network, which is the one thing this stack cannot do for itself: everything else runs on beepi, so it cannot report that beepi is down.\n\nThe free plan allows 10 API requests per minute. This dashboard refreshes every 5 minutes."
|
|
}
|
|
}
|
|
]
|
|
}
|