Grafana dashboard: RK prom
Description: RK middleware dashboard


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.2.1"
    },
    {
      "type": "panel",
      "id": "piechart",
      "name": "Pie chart",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "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"
      }
    ]
  },
  "description": "RK middleware dashboard",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 15111,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1648027445395,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "decimals": 2,
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "reqps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 14,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 4,
      "links": [],
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "lastNotNull",
            "min"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(rate(rk_prom_elapsedNano_count{entryName=~\"$entryName\", domain=~\"$domain\", restPath=~\"$restPath\", resCode=~\"$resCode\"}[1m])) by (restPath)",
          "format": "time_series",
          "hide": false,
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{grpcMethod}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "API Request Rate Per Second ( 1m Range )",
      "type": "timeseries"
    },
    {
      "datasource": "$DS_PROMETHEUS",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 0,
        "y": 14
      },
      "id": 6,
      "links": [],
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "count(rk_prom_elapsedNano_count{entryName=~\"$entryName\", domain=~\"$domain\", restPath=~\"$restPath\", resCode=~\"200\"}) by (resCode)/count(rk_prom_elapsedNano_count{entryName=~\"$entryName\", domain=~\"$domain\", restPath=~\"$restPath\"}) by (resCode) * 100",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{resCode}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "API Availability",
      "type": "timeseries"
    },
    {
      "datasource": "$DS_PROMETHEUS",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "links": [],
          "mappings": [],
          "max": 100,
          "min": 0,
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 12,
        "y": 14
      },
      "id": 17,
      "links": [],
      "options": {
        "displayLabels": [
          "name"
        ],
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "values": [
            "value"
          ]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "count(rk_prom_elapsedNano_count{entryName=~\"$entryName\", domain=~\"$domain\", restPath=~\"$restPath\"}) by (resCode)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{resCode}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "API Availability",
      "type": "piechart"
    },
    {
      "datasource": "$DS_PROMETHEUS",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ns"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 15,
        "w": 12,
        "x": 0,
        "y": 27
      },
      "id": 12,
      "links": [],
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "max",
            "min"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg(rk_prom_elapsedNano{entryName=~\"$entryName\", domain=~\"$domain\", restPath=~\"$restPath\", resCode=~\"$resCode\", quantile=\"0.9\"}) by (restPath)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{grpcMethod}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "API Duration P90",
      "type": "timeseries"
    },
    {
      "datasource": "$DS_PROMETHEUS",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ns"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 15,
        "w": 12,
        "x": 12,
        "y": 27
      },
      "id": 14,
      "links": [],
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "max",
            "min"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg(rk_prom_elapsedNano{entryName=~\"$entryName\", domain=~\"$domain\", restPath=~\"$restPath\", resCode=~\"$resCode\", quantile=\"0.99\"}) by (restPath)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{grpcMethod}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "API Duration P99",
      "type": "timeseries"
    },
    {
      "datasource": "$DS_PROMETHEUS",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ns"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 15,
        "w": 12,
        "x": 0,
        "y": 42
      },
      "id": 16,
      "links": [],
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "max",
            "min"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg(rk_prom_elapsedNano{entryName=~\"$entryName\", domain=~\"$domain\", restPath=~\"$restPath\", resCode=~\"$resCode\", quantile=\"0.999\"}) by (restPath)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{restPath}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "API Duration P99.9",
      "type": "timeseries"
    },
    {
      "datasource": "$DS_PROMETHEUS",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ns"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 15,
        "w": 12,
        "x": 12,
        "y": 42
      },
      "id": 10,
      "links": [],
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "max",
            "min"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg(rk_prom_elapsedNano{entryName=~\"$entryName\", domain=~\"$domain\", restPath=~\"$restPath\", resCode=~\"$resCode\", quantile=\"0.5\"}) by (restPath)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{grpcMethod}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "API Duration P50",
      "type": "timeseries"
    },
    {
      "datasource": "$DS_PROMETHEUS",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ns"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 14,
        "w": 24,
        "x": 0,
        "y": 57
      },
      "id": 8,
      "links": [],
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "max",
            "min"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg(rk_prom_elapsedNano{entryName=~\"$entryName\", domain=~\"$domain\", restPath=~\"$restPath\",  resCode=~\"$resCode\"}) by (restPath, quantile)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{restPath}}-{{quantile}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "API Duration Overall",
      "type": "timeseries"
    }
  ],
  "refresh": "",
  "schemaVersion": 31,
  "style": "dark",
  "tags": [
    "rk",
    "rk-boot",
    "rk-prom"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "Prometheus",
          "value": "Prometheus"
        },
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "DS_PROMETHEUS",
        "options": [],
        "query": "prometheus",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$DS_PROMETHEUS",
        "definition": "label_values(rk_prom_elapsedNano{}, entryName)",
        "description": null,
        "error": {
          "config": {
            "data": {
              "end": "1648027446",
              "match[]": "rk_prom_elapsedNano{}",
              "start": "1648026546"
            },
            "headers": {
              "Content-Type": "application/x-www-form-urlencoded",
              "X-Grafana-Org-Id": 1
            },
            "hideFromInspector": true,
            "method": "POST",
            "retry": 0,
            "url": "api/datasources/proxy/3/api/v1/series"
          },
          "data": {
            "error": "Bad Gateway",
            "message": "Bad Gateway",
            "response": ""
          },
          "message": "Bad Gateway",
          "status": 502,
          "statusText": "Bad Gateway"
        },
        "hide": 0,
        "includeAll": true,
        "label": "EntryName",
        "multi": false,
        "name": "entryName",
        "options": [],
        "query": {
          "query": "label_values(rk_prom_elapsedNano{}, entryName)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$DS_PROMETHEUS",
        "definition": "label_values(rk_prom_elapsedNano{entryName=~\"$entryName\"}, domain)",
        "description": null,
        "error": {
          "config": {
            "data": {
              "end": "1648027446",
              "match[]": "rk_prom_elapsedNano{entryName=~\"()\"}",
              "start": "1648026546"
            },
            "headers": {
              "Content-Type": "application/x-www-form-urlencoded",
              "X-Grafana-Org-Id": 1
            },
            "hideFromInspector": true,
            "method": "POST",
            "retry": 0,
            "url": "api/datasources/proxy/3/api/v1/series"
          },
          "data": {
            "error": "Bad Gateway",
            "message": "Bad Gateway",
            "response": ""
          },
          "message": "Bad Gateway",
          "status": 502,
          "statusText": "Bad Gateway"
        },
        "hide": 0,
        "includeAll": true,
        "label": "Domain",
        "multi": false,
        "name": "domain",
        "options": [],
        "query": {
          "query": "label_values(rk_prom_elapsedNano{entryName=~\"$entryName\"}, domain)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$DS_PROMETHEUS",
        "definition": "label_values(rk_prom_elapsedNano{entryName=~\"$entryName\",domain=~\"$domain\"}, restPath)",
        "description": null,
        "error": {
          "config": {
            "data": {
              "end": "1648027446",
              "match[]": "rk_prom_elapsedNano{entryName=~\"()\",domain=~\"()\"}",
              "start": "1648026546"
            },
            "headers": {
              "Content-Type": "application/x-www-form-urlencoded",
              "X-Grafana-Org-Id": 1
            },
            "hideFromInspector": true,
            "method": "POST",
            "retry": 0,
            "url": "api/datasources/proxy/3/api/v1/series"
          },
          "data": {
            "error": "Bad Gateway",
            "message": "Bad Gateway",
            "response": ""
          },
          "message": "Bad Gateway",
          "status": 502,
          "statusText": "Bad Gateway"
        },
        "hide": 0,
        "includeAll": true,
        "label": "RestPath",
        "multi": false,
        "name": "restPath",
        "options": [],
        "query": {
          "query": "label_values(rk_prom_elapsedNano{entryName=~\"$entryName\",domain=~\"$domain\"}, restPath)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$DS_PROMETHEUS",
        "definition": "label_values(rk_prom_elapsedNano{entryName=~\"$entryName\",domain=~\"$domain\",restPath=~\"$restPath\"}, resCode)",
        "description": null,
        "error": {
          "config": {
            "data": {
              "end": "1648027446",
              "match[]": "rk_prom_elapsedNano{entryName=~\"()\",domain=~\"()\",restPath=~\"()\"}",
              "start": "1648026546"
            },
            "headers": {
              "Content-Type": "application/x-www-form-urlencoded",
              "X-Grafana-Org-Id": 1
            },
            "hideFromInspector": true,
            "method": "POST",
            "retry": 0,
            "url": "api/datasources/proxy/3/api/v1/series"
          },
          "data": {
            "error": "Bad Gateway",
            "message": "Bad Gateway",
            "response": ""
          },
          "message": "Bad Gateway",
          "status": 502,
          "statusText": "Bad Gateway"
        },
        "hide": 0,
        "includeAll": true,
        "label": "ResCode",
        "multi": false,
        "name": "resCode",
        "options": [],
        "query": {
          "query": "label_values(rk_prom_elapsedNano{entryName=~\"$entryName\",domain=~\"$domain\",restPath=~\"$restPath\"}, resCode)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "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": "RK prom",
  "uid": "XEzxm1FWz",
  "version": 12
}