Grafana dashboard: ICMP exporter

This dashboard will represent metrics collected by the ICMP probe of the blackbox exporter and graph them in something that somewhat ressembles what good old Smokeping does.

Feel free to contact me for improvements or questions, anarcat AT debian.

See also the larger discussion at <https://anarc.at/blog/2020-06-04-replacing-smokeping-prometheus/> and the upstream repository at: <https://gitlab.com/anarcat/grafana-dashboards>

{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": 21,
  "iteration": 1665156483102,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "cards": {},
      "color": {
        "cardColor": "#b4ff00",
        "colorScale": "sqrt",
        "colorScheme": "interpolateRdYlGn",
        "exponent": 0.5,
        "mode": "spectrum"
      },
      "dataFormat": "tsbuckets",
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "heatmap": {},
      "hideZeroBuckets": false,
      "highlightCards": true,
      "id": 7,
      "legend": {
        "show": true
      },
      "reverseYBuckets": true,
      "targets": [
        {
          "expr": "sum(probe_icmp_duration_seconds{phase=\"rtt\",instance=~\"$instance\"}) by (instance)",
          "legendFormat": "{{instance}}",
          "refId": "A"
        }
      ],
      "title": "ICMP RTT",
      "tooltip": {
        "show": true,
        "showHistogram": true
      },
      "type": "heatmap",
      "xAxis": {
        "show": true
      },
      "yAxis": {
        "format": "dtdurations",
        "logBase": 1,
        "show": true
      },
      "yBucketBound": "middle"
    },
    {
      "cards": {},
      "color": {
        "cardColor": "#b4ff00",
        "colorScale": "sqrt",
        "colorScheme": "interpolateRdYlGn",
        "exponent": 0.5,
        "mode": "spectrum"
      },
      "dataFormat": "tsbuckets",
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "heatmap": {},
      "hideZeroBuckets": false,
      "highlightCards": true,
      "id": 8,
      "legend": {
        "show": true
      },
      "reverseYBuckets": true,
      "targets": [
        {
          "expr": "1-avg_over_time(probe_success{instance=~\"$instance\"}[$__interval])",
          "format": "time_series",
          "hide": false,
          "legendFormat": "{{instance}}",
          "refId": "A"
        }
      ],
      "title": "ICMP packet loss",
      "tooltip": {
        "show": true,
        "showHistogram": true
      },
      "type": "heatmap",
      "xAxis": {
        "show": true
      },
      "yAxis": {
        "format": "percentunit",
        "logBase": 1,
        "show": true
      },
      "yBucketBound": "middle"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "description": "This uses the blackbox exporter, which does not expose packet loss, for example. It could be improved with https://github.com/SuperQ/smokeping_prober because it also keeps track of lost samples (https://github.com/SuperQ/smokeping_prober/issues/24). Unfortunately, that still won't make graphs as nice as smokeping, because each probe only keeps one sample, instead of doing multiple like smokeping does (https://github.com/SuperQ/smokeping_prober/issues/36).",
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 16
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "hideEmpty": false,
        "hideZero": false,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "maxPerRow": 2,
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.3.4",
      "pointradius": 0.5,
      "points": false,
      "renderer": "flot",
      "repeat": "instance",
      "repeatDirection": "v",
      "seriesOverrides": [
        {
          "alias": "packet loss",
          "color": "#C4162A",
          "lines": false,
          "pointradius": 1,
          "points": true,
          "yaxis": 2
        },
        {
          "alias": "max RTT",
          "fillBelowTo": "min RTT",
          "legend": false,
          "lines": false
        },
        {
          "alias": "min RTT",
          "legend": false,
          "lines": false
        },
        {
          "alias": "RTT",
          "lines": false
        },
        {
          "alias": "avg RTT",
          "legend": false
        },
        {
          "alias": "min RTT",
          "lines": false
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "1-avg_over_time(probe_success{instance=~\"$instance\"}[$__interval])",
          "format": "time_series",
          "legendFormat": "packet loss",
          "refId": "B"
        },
        {
          "expr": "probe_icmp_duration_seconds{phase=\"rtt\",instance=~\"$instance\"} > 0",
          "hide": false,
          "instant": false,
          "legendFormat": "RTT",
          "refId": "A"
        },
        {
          "expr": "avg_over_time(probe_icmp_duration_seconds{phase=\"rtt\",instance=~\"$instance\"}[5m])",
          "hide": false,
          "instant": false,
          "legendFormat": "avg RTT",
          "refId": "C"
        },
        {
          "expr": "max_over_time(probe_icmp_duration_seconds{phase=\"rtt\",instance=~\"$instance\"}[1m])",
          "hide": false,
          "instant": false,
          "legendFormat": "max RTT",
          "refId": "D"
        },
        {
          "expr": "min_over_time(probe_icmp_duration_seconds{phase=\"rtt\",instance=~\"$instance\"}[1m])",
          "hide": false,
          "instant": false,
          "legendFormat": "min RTT",
          "refId": "E"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "ICMP round trip time ($instance)",
      "tooltip": {
        "shared": true,
        "sort": 1,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "dtdurations",
          "label": "RTT",
          "logBase": 1,
          "min": "0",
          "show": true
        },
        {
          "format": "percentunit",
          "label": "packet loss",
          "logBase": 1,
          "max": "1",
          "min": "0.0001",
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    }
  ],
  "refresh": "5m",
  "schemaVersion": 34,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "definition": "label_values(probe_success, job)",
        "hide": 0,
        "includeAll": true,
        "label": "Job",
        "multi": true,
        "name": "job",
        "options": [],
        "query": {
          "query": "label_values(probe_success, job)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": {
          "type": "prometheus",
          "uid": "000000002"
        },
        "definition": "label_values(probe_success{job=~\"$job\"},instance)",
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "instance",
        "options": [],
        "query": {
          "query": "label_values(probe_success{job=~\"$job\"},instance)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "ICMP exporter",
  "uid": "oe-msimGz",
  "version": 10,
  "weekStart": "",
  "gnetId": 12412
}