Kuadrant/gateway-api-state-metrics

dashboard: Panel to show 'uptime' per Gateway based on status

david-martin opened this issue · 2 comments

Being able to see historical uptime/healthy/unhealthy state of a Gateway would be useful.
Also, see what's happening now with the status of the gateway. This may be on the same panel or a separate one.

ping @candita for any additional context for this panel and info on what panel type would make sense

Example panel
image

panel json for above screenshot

{
  "datasource": {
    "type": "prometheus",
    "uid": "$datasource"
  },
  "description": "Number of Gateways not in an Accepted and Programmed state",
  "fieldConfig": {
    "defaults": {
      "custom": {
        "drawStyle": "line",
        "lineInterpolation": "linear",
        "barAlignment": 0,
        "lineWidth": 1,
        "fillOpacity": 0,
        "gradientMode": "none",
        "spanNulls": false,
        "insertNulls": false,
        "showPoints": "auto",
        "pointSize": 5,
        "stacking": {
          "mode": "none",
          "group": "A"
        },
        "axisPlacement": "auto",
        "axisLabel": "",
        "axisColorMode": "text",
        "axisBorderShow": false,
        "scaleDistribution": {
          "type": "linear"
        },
        "axisCenteredZero": false,
        "hideFrom": {
          "tooltip": false,
          "viz": false,
          "legend": false
        },
        "thresholdsStyle": {
          "mode": "off"
        }
      },
      "color": {
        "mode": "palette-classic"
      },
      "mappings": [],
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          },
          {
            "color": "red",
            "value": 1
          }
        ]
      }
    },
    "overrides": []
  },
  "gridPos": {
    "h": 5,
    "w": 5,
    "x": 14,
    "y": 13
  },
  "id": 32,
  "options": {
    "tooltip": {
      "mode": "single",
      "sort": "none"
    },
    "legend": {
      "showLegend": true,
      "displayMode": "list",
      "placement": "bottom",
      "calcs": []
    }
  },
  "pluginVersion": "10.2.0-60477",
  "targets": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "$datasource"
      },
      "editorMode": "code",
      "exemplar": false,
      "expr": "count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Accepted\"} == 0) or vector(0)",
      "instant": false,
      "legendFormat": "Accepted",
      "range": true,
      "refId": "A"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "$datasource"
      },
      "editorMode": "code",
      "exemplar": false,
      "expr": "count(gatewayapi_gateway_status{name=~\"$gateway\",type=\"Programmed\"} == 0) or vector(0)",
      "hide": false,
      "instant": false,
      "legendFormat": "Programmed",
      "range": true,
      "refId": "C"
    }
  ],
  "title": "Unhealthy",
  "type": "timeseries"
}