Grafana dashboard: PingExporter
Description: A simple dashboard for https://github.com/czerwonk/ping_exporter

A simple Dashboard for https://github.com/czerwonk/ping_exporter

{
  "__inputs": [],
  "__elements": {},
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.3.6"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph (old)",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table-old",
      "name": "Table (old)",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "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": 1,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "columns": [],
      "datasource": {
        "uid": "$DS_PROMETHEUS"
      },
      "fontSize": "100%",
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "links": [],
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 5,
        "desc": false
      },
      "styles": [
        {
          "alias": "Time",
          "align": "auto",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "Host",
          "align": "auto",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "target",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "Success",
          "align": "auto",
          "colorMode": "value",
          "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": 2,
          "mappingType": 2,
          "pattern": "Value #A",
          "rangeMaps": [
            {
              "from": "1",
              "text": "no",
              "to": "2"
            },
            {
              "from": "0",
              "text": "yes",
              "to": "1"
            }
          ],
          "thresholds": [
            "0.1",
            "1"
          ],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "text": "no",
              "value": "1"
            },
            {
              "text": "no",
              "value": "0"
            }
          ]
        },
        {
          "alias": "IPv4",
          "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": "ipv4",
          "thresholds": [
            ""
          ],
          "type": "string",
          "unit": "percentunit",
          "valueMaps": []
        },
        {
          "alias": "Loss IPv4",
          "align": "auto",
          "colorMode": "value",
          "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": 2,
          "mappingType": 1,
          "pattern": "Value #B",
          "thresholds": [
            "0.1",
            "0.5"
          ],
          "type": "number",
          "unit": "percentunit"
        },
        {
          "alias": "IPv6",
          "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": "ipv6",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "Loss IPv6",
          "align": "auto",
          "colorMode": "value",
          "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": 2,
          "mappingType": 1,
          "pattern": "Value #C",
          "thresholds": [
            "0.1",
            "0.5"
          ],
          "type": "number",
          "unit": "percentunit"
        },
        {
          "alias": "Instance",
          "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": "string",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "datasource": {
            "uid": "$DS_PROMETHEUS"
          },
          "expr": "sum(ping_loss_percent{job=~\"$job\",instance=~\"$instance\",target=~\"$target\",ip_version=~\"$ip_version\"}) by (instance,target) / count(ping_loss_percent{job=~\"$job\",instance=~\"$instance\",target=~\"$target\",ip_version=~\"$ip_version\"}) by (instance,target)",
          "format": "table",
          "hide": false,
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A",
          "step": 2
        },
        {
          "datasource": {
            "uid": "$DS_PROMETHEUS"
          },
          "expr": "sum(label_replace(ping_loss_percent{job=~\"$job\",instance=~\"$instance\",target=~\"$target\",ip_version=~\"$ip_version\",ip_version=\"4\"}, \"ipv4\", \"$1\", \"ip\", \"(.*)\")) by (instance,target,ipv4)",
          "format": "table",
          "hide": false,
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "B",
          "step": 2
        },
        {
          "datasource": {
            "uid": "$DS_PROMETHEUS"
          },
          "expr": "sum(label_replace(ping_loss_percent{job=~\"$job\",instance=~\"$instance\",target=~\"$target\",ip_version=~\"$ip_version\",ip_version=\"6\"}, \"ipv6\", \"$1\", \"ip\", \"(.*)\")) by (instance,target,ipv6)",
          "format": "table",
          "hide": false,
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "C",
          "step": 2
        }
      ],
      "title": "Ping Success",
      "transform": "table",
      "type": "table-old"
    },
    {
      "collapsed": true,
      "datasource": {
        "type": "prometheus",
        "uid": "000000001"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "id": 23,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": {
            "uid": "$DS_PROMETHEUS"
          },
          "fieldConfig": {
            "defaults": {
              "links": []
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 12,
            "x": 0,
            "y": 10
          },
          "hiddenSeries": false,
          "id": 3,
          "legend": {
            "alignAsTable": false,
            "avg": false,
            "current": true,
            "hideEmpty": true,
            "hideZero": false,
            "max": false,
            "min": false,
            "rightSide": false,
            "show": false,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "links": [],
          "maxPerRow": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.2.4",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "repeat": "target",
          "repeatDirection": "h",
          "seriesOverrides": [
            {
              "alias": "IPv4 worst",
              "color": "#B877D9",
              "fillBelowTo": "IPv4 best",
              "lines": false
            },
            {
              "alias": "IPv4 mean",
              "color": "#B877D9"
            },
            {
              "alias": "IPv4 best",
              "color": "#B877D9",
              "lines": false
            },
            {
              "alias": "IPv6 worst",
              "color": "#5794F2",
              "fillBelowTo": "IPv6 best",
              "lines": false
            },
            {
              "alias": "IPv6 mean",
              "color": "#5794F2"
            },
            {
              "alias": "IPv6 best",
              "color": "#5794F2",
              "lines": false
            },
            {
              "alias": "IPv4 loss",
              "color": "#DEB6F2",
              "fill": 2,
              "linewidth": 0,
              "yaxis": 2
            },
            {
              "alias": "IPv6 loss",
              "color": "#C0D8FF",
              "fill": 2,
              "linewidth": 0,
              "yaxis": 2
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": {
                "uid": "$DS_PROMETHEUS"
              },
              "expr": "avg(ping_rtt_best_ms{job=~\"$job\",instance=~\"$instance\",target=~\"$target\",ip_version=~\"$ip_version\"}) by (ip_version)",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 1,
              "legendFormat": "IPv{{ip_version}} best",
              "metric": "probe_",
              "refId": "A",
              "step": 2
            },
            {
              "datasource": {
                "uid": "$DS_PROMETHEUS"
              },
              "expr": "avg(ping_rtt_mean_ms{job=~\"$job\",instance=~\"$instance\",target=~\"$target\",ip_version=~\"$ip_version\"}) by (ip_version)",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 1,
              "legendFormat": "IPv{{ip_version}} mean",
              "metric": "probe_",
              "refId": "B",
              "step": 2
            },
            {
              "datasource": {
                "uid": "$DS_PROMETHEUS"
              },
              "expr": "avg(ping_rtt_worst_ms{job=~\"$job\",instance=~\"$instance\",target=~\"$target\",ip_version=~\"$ip_version\"}) by (ip_version)",
              "format": "time_series",
              "instant": false,
              "intervalFactor": 1,
              "legendFormat": "IPv{{ip_version}} worst",
              "metric": "probe_",
              "refId": "C",
              "step": 2
            },
            {
              "datasource": {
                "uid": "$DS_PROMETHEUS"
              },
              "expr": "avg(ping_loss_percent{job=~\"$job\",instance=~\"$instance\",target=~\"$target\",ip_version=~\"$ip_version\"}) by (ip_version)",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "IPv{{ip_version}} loss",
              "refId": "D"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "Target $target",
          "tooltip": {
            "shared": true,
            "sort": 2,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "ms",
              "label": "RTT",
              "logBase": 1,
              "min": "0",
              "show": true
            },
            {
              "format": "percentunit",
              "label": "Loss",
              "logBase": 1,
              "max": "1",
              "min": "0",
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        }
      ],
      "repeat": "instance",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "000000001"
          },
          "refId": "A"
        }
      ],
      "title": "Instance $instance",
      "type": "row"
    }
  ],
  "refresh": "10s",
  "schemaVersion": 37,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "PromShort",
          "value": "PromShort"
        },
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "DS_PROMETHEUS",
        "options": [],
        "query": "prometheus",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allFormat": "glob",
        "allValue": "",
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "$DS_PROMETHEUS"
        },
        "definition": "label_values(ping_loss_percent,job)",
        "hide": 0,
        "includeAll": true,
        "label": "Job",
        "multi": true,
        "multiFormat": "glob",
        "name": "job",
        "options": [],
        "query": {
          "query": "label_values(ping_loss_percent,job)",
          "refId": "PromShort-job-Variable-Query"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allFormat": "glob",
        "allValue": "",
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "$DS_PROMETHEUS"
        },
        "definition": "label_values(ping_loss_percent{job=~\"$job\"},instance)",
        "hide": 0,
        "includeAll": true,
        "label": "Instance",
        "multi": true,
        "multiFormat": "glob",
        "name": "instance",
        "options": [],
        "query": {
          "query": "label_values(ping_loss_percent{job=~\"$job\"},instance)",
          "refId": "PromShort-instance-Variable-Query"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allFormat": "glob",
        "allValue": "",
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "$DS_PROMETHEUS"
        },
        "definition": "label_values(ping_loss_percent{job=~\"$job\",instance=~\"$instance\"},target)",
        "hide": 0,
        "includeAll": true,
        "label": "Target",
        "multi": true,
        "multiFormat": "glob",
        "name": "target",
        "options": [],
        "query": {
          "query": "label_values(ping_loss_percent{job=~\"$job\",instance=~\"$instance\"},target)",
          "refId": "PromShort-target-Variable-Query"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allFormat": "glob",
        "allValue": "",
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "$DS_PROMETHEUS"
        },
        "definition": "label_values(ping_loss_percent{job=~\"$job\",instance=~\"$instance\"},ip_version)",
        "hide": 0,
        "includeAll": true,
        "label": "IP Version",
        "multi": true,
        "multiFormat": "glob",
        "name": "ip_version",
        "options": [],
        "query": {
          "query": "label_values(ping_loss_percent{job=~\"$job\",instance=~\"$instance\"},ip_version)",
          "refId": "PromShort-ip_version-Variable-Query"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "to": "now"
  },
  "timepicker": {
    "now": true,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "browser",
  "title": "PingExporter",
  "uid": "pv02xrZWz",
  "version": 7,
  "weekStart": "",
  "gnetId": 18194,
  "description": "A simple dashboard for https://github.com/czerwonk/ping_exporter"
}