Grafana dashboard: Uptime robot
Description: Visualise uptimerobot.com infos : down, up, paused monitors, response time, psp, ... 

It use uptimerobot_exporter to expose infos from your uptimerobot.com account for Prometheus. It provide :
- number of down monitors : down_monitors
- number of up monitors : up_monitors
- number of paused monitors : paused_monitors
- Maximum monitor : monitor_limit
- Monitor status (Monitors) :  name, url, type, [keyword], [keyword_value], interval, status (color change with status)
- Responste time : Minimum (min), maximum (max), average (avg) and current
- public status page (psp)

## Docker 
```bash
docker run -d --name uptimerobot_exporter -e 'UPTIMEROBOT_API_KEY=your_uptime_robot_api_key' -p 9705:9705 --read-only lekpamartin/uptimerobot_exporter
```

if you don't use docker run the python script :
```bash
python3 files/exporter.py
```
## Prometheus
Add the target 

## Grafana 
- import dashboard (id 9955)
- Add prometheus datasource (name Prometheus)

## More informations 
https://github.com/lekpamartin/uptimerobot_exporter

{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Visualise uptimerobot.com infos : down, up, paused monitors, response time, psp, ... ",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 9955,
  "graphTooltip": 0,
  "id": 5,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "columns": [],
      "datasource": {
        "type": "prometheus",
        "uid": "a58e10b8-f4df-4227-b320-fe9b584b0aa3"
      },
      "fontSize": "100%",
      "gridPos": {
        "h": 3,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 6,
      "links": [],
      "pageSize": 1,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 0,
        "desc": true
      },
      "styles": [
        {
          "alias": "Time",
          "align": "auto",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "__name__",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "instance",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "job",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "/.*/",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "a58e10b8-f4df-4227-b320-fe9b584b0aa3"
          },
          "expr": "uptimerobot_accountdetails",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Uptime robot status",
      "transform": "table",
      "type": "table-old"
    },
    {
      "columns": [],
      "datasource": {
        "type": "prometheus",
        "uid": "a58e10b8-f4df-4227-b320-fe9b584b0aa3"
      },
      "fontSize": "100%",
      "gridPos": {
        "h": 5,
        "w": 24,
        "x": 0,
        "y": 3
      },
      "id": 4,
      "links": [],
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 10,
        "desc": true
      },
      "styles": [
        {
          "$$hashKey": "object:44",
          "alias": "Time",
          "align": "auto",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "date"
        },
        {
          "$$hashKey": "object:45",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "__name__",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "$$hashKey": "object:46",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "instance",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "$$hashKey": "object:47",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "job",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "$$hashKey": "object:48",
          "alias": "Status",
          "align": "auto",
          "colorMode": "row",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 0,
          "mappingType": 1,
          "pattern": "Value",
          "preserveFormat": false,
          "thresholds": [
            "1",
            "3"
          ],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "$$hashKey": "object:111",
              "text": "OK",
              "value": "0"
            },
            {
              "$$hashKey": "object:112",
              "text": "Started",
              "value": "1"
            },
            {
              "$$hashKey": "object:113",
              "text": "Paused",
              "value": "2"
            },
            {
              "$$hashKey": "object:114",
              "text": "KO",
              "value": "3"
            }
          ]
        },
        {
          "$$hashKey": "object:49",
          "alias": "Interval",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "c9_interval",
          "thresholds": [],
          "type": "number",
          "unit": "s"
        },
        {
          "$$hashKey": "object:50",
          "alias": "Name",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "link": true,
          "linkTargetBlank": true,
          "linkTooltip": "${__cell_3}",
          "linkUrl": "${__cell_3:raw}",
          "mappingType": 1,
          "pattern": "c1_name",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "$$hashKey": "object:51",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "c2_url",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "$$hashKey": "object:382",
          "alias": "Type",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "c3_type",
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "$$hashKey": "object:403",
              "text": "HTTP(s)",
              "value": "1"
            },
            {
              "$$hashKey": "object:405",
              "text": "Keyword",
              "value": "2"
            },
            {
              "$$hashKey": "object:407",
              "text": "Ping",
              "value": "3"
            },
            {
              "$$hashKey": "object:409",
              "text": "Port",
              "value": "4"
            },
            {
              "$$hashKey": "object:411",
              "text": "Heartbeat",
              "value": "5"
            }
          ]
        },
        {
          "$$hashKey": "object:413",
          "alias": "Keyword_Type",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "c5_keyword_type",
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "$$hashKey": "object:434",
              "text": "exists",
              "value": "1"
            },
            {
              "$$hashKey": "object:436",
              "text": "not exists",
              "value": "2"
            }
          ]
        },
        {
          "$$hashKey": "object:52",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "/.*/",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "a58e10b8-f4df-4227-b320-fe9b584b0aa3"
          },
          "expr": "sort(uptimerobot_status)",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Monitors status",
      "transform": "table",
      "type": "table-old"
    },
    {
      "columns": [],
      "datasource": {
        "type": "prometheus",
        "uid": "a58e10b8-f4df-4227-b320-fe9b584b0aa3"
      },
      "fontSize": "100%",
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 8,
      "links": [],
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 9,
        "desc": true
      },
      "styles": [
        {
          "$$hashKey": "object:127",
          "alias": "Time",
          "align": "auto",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "date"
        },
        {
          "$$hashKey": "object:128",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "__name__",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "$$hashKey": "object:129",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "job",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "$$hashKey": "object:130",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "instance",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "$$hashKey": "object:131",
          "alias": "Name",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "link": true,
          "linkTooltip": "${__cell_3}",
          "linkUrl": "${__cell_3:raw}",
          "mappingType": 1,
          "pattern": "c1_name",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "$$hashKey": "object:132",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "c2_custom_url",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "$$hashKey": "object:133",
          "alias": "standard_url",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "link": true,
          "linkTooltip": "${__cell_2:raw}",
          "linkUrl": "${__cell_3:raw}",
          "mappingType": 1,
          "pattern": "c3_standard_url",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "$$hashKey": "object:232",
          "alias": "",
          "align": "auto",
          "colorMode": "row",
          "colors": [
            "#FF9830",
            "#73BF69",
            "#F2495C"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value",
          "thresholds": [
            "1",
            "2"
          ],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "$$hashKey": "object:255",
              "text": "Désactivé",
              "value": "0"
            },
            {
              "$$hashKey": "object:257",
              "text": "Actif",
              "value": "1"
            }
          ]
        },
        {
          "$$hashKey": "object:145",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "c5_sort",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "$$hashKey": "object:167",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "c4_monitors",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "$$hashKey": "object:134",
          "alias": "",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "/.*/",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "a58e10b8-f4df-4227-b320-fe9b584b0aa3"
          },
          "expr": "uptimerobot_psp",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Public status pages",
      "transform": "table",
      "type": "table-old"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "a58e10b8-f4df-4227-b320-fe9b584b0aa3"
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 14
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "paceLength": 10,
      "percentage": false,
      "pluginVersion": "9.5.2",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "a58e10b8-f4df-4227-b320-fe9b584b0aa3"
          },
          "expr": "uptimerobot_response_time",
          "format": "time_series",
          "instant": false,
          "intervalFactor": 1,
          "legendFormat": "{{ name }}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Monitors Response time",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "ms",
          "logBase": 1,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    }
  ],
  "refresh": "15m",
  "schemaVersion": 38,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-12h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Uptime robot",
  "uid": "7Wd27Frmz",
  "version": 5,
  "weekStart": ""
}