Grafana dashboard: Jaeger Query

- (Jaeger)[https://www.jaegertracing.io/] is an open source, end-to-end distributed tracing solution. It is a part of the Cloud Native Computing Foundation (CNCF)[https://www.cncf.io/].
- The (jaeger-query)[https://www.jaegertracing.io/docs/1.7/deployment/#query-service-ui] is part of the Jaeger deployment architecture that retrieves traces, service list, operations list, tags, etc from the trace persistence backend (e.g. cassandra, elasticsearch) and returns thse in response to the users' UI/API requests.
- It is possible to deploy jaeger-query in a kubernetes environment, for example through steps described (here)[https://github.com/jaegertracing/jaeger-kubernetes].
- This dashboard helps you monitor the health of a jaeger-query component that is running in a kubernetes environment.

{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "5.2.4"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "5.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 8478,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1540097715266,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 0,
        "y": 0
      },
      "id": 20,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": true,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "(jaeger_client_jaeger_rpc_request_latency_sum{kubernetes_namespace=~\"$k8s_ns\"} / jaeger_client_jaeger_rpc_request_latency_count{kubernetes_namespace=~\"$k8s_ns\"})*1000",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{kubernetes_namespace}}.{{endpoint}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Average request latency (milliseconds)",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 8,
        "y": 0
      },
      "id": 10,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "All requests (/min)",
          "refId": "A"
        },
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",status_code=~\"2xx\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "2xx Requests (/min)",
          "refId": "B"
        },
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",status_code!=\"2xx\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Non-2xx Requests (/min)",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Requests/min (All requests)",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 16,
        "y": 0
      },
      "id": 16,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/traces\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "All requests (/min)",
          "refId": "A"
        },
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/traces\",status_code=~\"2xx\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "2xx Requests (/min)",
          "refId": "B"
        },
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/traces\",status_code!=\"2xx\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Non-2xx Requests (/min)",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Requests/min (endpoint=\"/api/traces\")",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 0,
        "y": 9
      },
      "id": 18,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/traces/-traceID-\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "All requests (/min)",
          "refId": "A"
        },
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/traces/-traceID-\",status_code=~\"2xx\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "2xx Requests (/min)",
          "refId": "B"
        },
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/traces/-traceID-\",status_code!=\"2xx\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Non-2xx Requests (/min)",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Requests/min (endpoint=\"/api/traces/-traceID-\")",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 8,
        "y": 9
      },
      "id": 14,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/services/-service-/operations\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "All requests (/min)",
          "refId": "A"
        },
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/services/-service-/operations\",status_code=~\"2xx\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "2xx Requests (/min)",
          "refId": "B"
        },
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/services/-service-/operations\",status_code!=\"2xx\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Non-2xx Requests (/min)",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Requests/min (endpoint=\"/api/services/-service-/operations\")",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 16,
        "y": 9
      },
      "id": 12,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/services\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "All requests (/min)",
          "refId": "A"
        },
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/services\",status_code=~\"2xx\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "2xx Requests (/min)",
          "refId": "B"
        },
        {
          "expr": "sum(rate(jaeger_client_jaeger_rpc_http_requests{kubernetes_namespace=~\"$k8s_ns\",endpoint=~\"/api/services\",status_code!=\"2xx\"}[5m]))*60",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Non-2xx Requests (/min)",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Requests/min (endpoint=\"/api/services\")",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": false,
  "schemaVersion": 16,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": false,
        "label": "k8s_ns",
        "multi": true,
        "name": "k8s_ns",
        "options": [],
        "query": "label_values(kubernetes_namespace)",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "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": "Jaeger Query",
  "uid": "B5W6D5xmz",
  "version": 6
}