From e170dbadb34356664c55179c813fa3acf513e097 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Fri, 1 Dec 2023 21:39:15 +0100 Subject: [PATCH] Fix example/grafana-integration (#4980) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Which problem is this PR solving? Currently, the `grafana-integration` example doesn't work properly: if you run `docker-compose up` in that folder, services will start but only logging will work, the metrics and tracing won't. ## Description of the changes * Fix traces endpoint config for hotrod (`traces export: Post "http://localhost:4318/v1/traces": dial tcp 127.0.0.1:4318: connect: connection refused`) * Fix hotrod metrics scraping (endpoint has moved to the frontend service) * Pin Jaeger/hotrod tags to prevent future issues * Fix Grafana dashboard (metric names, labels, migrate to new time series panel) * Add default Grafana credentials to README * Fix the loki container being stuck on shutdown by setting shorter timeouts (bug with the driver: https://github.com/grafana/loki/issues/2361#issuecomment-718024318) * Update Grafana/Loki/Prom pinned versions (especially to get Grafana UI improvements) ## How was this change tested? `docker-compose up` 🙂 SCR-20231201-cohy SCR-20231201-cxos SCR-20231201-coke ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` Signed-off-by: Stanislas Lange --- examples/grafana-integration/README.md | 4 +- .../grafana-integration/docker-compose.yaml | 20 +- .../grafana/hotrod_metrics_logs.json | 2372 ++++------------- .../prometheus/prometheus.yml | 7 +- 4 files changed, 481 insertions(+), 1922 deletions(-) diff --git a/examples/grafana-integration/README.md b/examples/grafana-integration/README.md index af4be420a41..24b18f571e8 100644 --- a/examples/grafana-integration/README.md +++ b/examples/grafana-integration/README.md @@ -20,11 +20,11 @@ grafana/loki-docker-driver:latest \ ### Run the services -`docker-compose up` +`docker-compose up` ### Access the services * HotROD application at http://localhost:8080 -* Grafana UI at http://localhost:3000 +* Grafana UI at http://localhost:3000 (default credentials: admin/admin) ### Explore with Loki diff --git a/examples/grafana-integration/docker-compose.yaml b/examples/grafana-integration/docker-compose.yaml index da9f8605980..8751a58f47e 100644 --- a/examples/grafana-integration/docker-compose.yaml +++ b/examples/grafana-integration/docker-compose.yaml @@ -2,7 +2,7 @@ version: '2' services: grafana: - image: grafana/grafana:7.1.4 + image: grafana/grafana:10.2.2 ports: - '3000:3000' volumes: @@ -15,7 +15,7 @@ services: loki-url: 'http://localhost:3100/api/prom/push' loki: - image: grafana/loki:master + image: grafana/loki:2.9.2 ports: - '3100:3100' command: -config.file=/etc/loki/local-config.yaml @@ -29,9 +29,14 @@ services: driver: loki options: loki-url: 'http://localhost:3100/api/prom/push' + # Prevent container from being stuck when shutting down + # https://github.com/grafana/loki/issues/2361#issuecomment-718024318 + loki-timeout: 1s + loki-max-backoff: 1s + loki-retries: 1 jaeger: - image: jaegertracing/all-in-one:latest + image: jaegertracing/all-in-one:1.51 ports: - '6831:6831' - '16686:16686' @@ -41,27 +46,26 @@ services: loki-url: 'http://localhost:3100/api/prom/push' hotrod: - image: jaegertracing/example-hotrod:latest + image: jaegertracing/example-hotrod:1.51 ports: - '8080:8080' - '8083:8083' command: ["-m","prometheus","all"] environment: - - JAEGER_AGENT_HOST=jaeger - - JAEGER_AGENT_PORT=6831 + - OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318 logging: driver: loki options: loki-url: 'http://localhost:3100/api/prom/push' prometheus: - image: prom/prometheus:v2.19.1 + image: prom/prometheus:v2.48.0 volumes: - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro ports: - '9090:9090' command: - - --config.file=/etc/prometheus/prometheus.yml + - --config.file=/etc/prometheus/prometheus.yml logging: driver: loki options: diff --git a/examples/grafana-integration/grafana/hotrod_metrics_logs.json b/examples/grafana-integration/grafana/hotrod_metrics_logs.json index b48e00aeaef..b7d471497b1 100644 --- a/examples/grafana-integration/grafana/hotrod_metrics_logs.json +++ b/examples/grafana-integration/grafana/hotrod_metrics_logs.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -14,15 +17,18 @@ }, "description": "", "editable": true, + "fiscalYearStartMonth": 0, "gnetId": 12611, "graphTooltip": 0, - "id": 1, - "iteration": 1598696501892, "links": [], + "liveNow": false, "panels": [ { "collapsed": false, - "datasource": null, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, "gridPos": { "h": 1, "w": 24, @@ -31,35 +37,62 @@ }, "id": 43, "panels": [], + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "refId": "A" + } + ], "title": "Loki Overview", "type": "row" }, { - "cacheTimeout": null, - "colorBackground": false, - "colorPostfix": true, - "colorValue": true, - "colors": [ - "rgb(31, 255, 7)", - "rgb(31, 255, 7)", - "rgb(31, 255, 7)" - ], - "datasource": "Loki", + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, "description": "Total Count of log lines in the specified time range", "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "rgb(31, 255, 7)", + "text": "0" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(31, 255, 7)", + "value": null + }, + { + "color": "rgb(31, 255, 7)", + "value": 10 + }, + { + "color": "rgb(31, 255, 7)", + "value": 50 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "format": "short", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 3, "w": 12, @@ -67,96 +100,83 @@ "y": 1 }, "id": 11, - "interval": null, "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "$$hashKey": "object:65", - "name": "value to text", - "value": 1 - }, - { - "$$hashKey": "object:66", - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "pluginVersion": "6.4.3", - "postfix": " lines", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgb(0, 82, 0)", - "full": false, - "lineColor": "rgb(31, 255, 7)", - "show": true, - "ymax": null, - "ymin": null + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "/^{}$/", + "values": false + }, + "textMode": "auto", + "wideLayout": true }, - "tableColumn": "{}", + "pluginVersion": "10.2.2", "targets": [ { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, "expr": "sum(count_over_time(({container_name=\"$container_name\"})[$__interval]))", "hide": false, "legendFormat": "", "refId": "A" } ], - "thresholds": "10,50", - "timeFrom": null, - "timeShift": null, "title": "Total Count of logs", - "type": "singlestat", - "valueFontSize": "70%", - "valueMaps": [ - { - "$$hashKey": "object:68", - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "total" + "type": "stat" }, { - "cacheTimeout": null, - "colorBackground": false, - "colorPostfix": true, - "colorPrefix": false, - "colorValue": true, - "colors": [ - "rgb(222, 15, 43)", - "rgb(222, 15, 43)", - "rgb(222, 15, 43)" - ], - "datasource": "Loki", + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, "description": "Total Count: of pattern: $searchable_pattern in the specified time range", "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "rgb(222, 15, 43)", + "text": "0" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(222, 15, 43)", + "value": null + }, + { + "color": "rgb(222, 15, 43)", + "value": 10 + }, + { + "color": "rgb(222, 15, 43)", + "value": 50 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "format": "short", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 3, "w": 12, @@ -164,78 +184,45 @@ "y": 1 }, "id": 6, - "interval": null, "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "$$hashKey": "object:1630", - "name": "value to text", - "value": 1 - }, - { - "$$hashKey": "object:1631", - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "pluginVersion": "6.4.3", - "postfix": " \"$searchable_pattern\"", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgb(105, 34, 43)", - "full": false, - "lineColor": "#C4162A", - "show": true, - "ymax": null, - "ymin": null + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "/^{}$/", + "values": false + }, + "textMode": "auto", + "wideLayout": true }, - "tableColumn": "{}", + "pluginVersion": "10.2.2", "targets": [ { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, "expr": "sum(count_over_time(({container_name=\"$container_name\"} |~ \"(?i)$searchable_pattern\")[$__interval]))", "hide": false, "legendFormat": "", "refId": "A" } ], - "thresholds": "10,50", - "timeFrom": null, - "timeShift": null, "title": "Total Count: of pattern $searchable_pattern", - "type": "singlestat", - "valueFontSize": "70%", - "valueMaps": [ - { - "$$hashKey": "object:1633", - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "total" + "type": "stat" }, { - "datasource": "Loki", - "description": "Live logs is a like 'tail -f' in a real time", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" }, + "description": "Live logs is a like 'tail -f' in a real time", "gridPos": { "h": 8, "w": 18, @@ -244,6 +231,10 @@ }, "id": 2, "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, "showLabels": false, "showTime": false, "sortOrder": "Descending", @@ -251,37 +242,42 @@ }, "targets": [ { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, "expr": "{container_name=\"$container_name\"} |~ \"(?i)$searchable_pattern\" ", "hide": false, "legendFormat": "", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Live logs", "type": "logs" }, { - "cacheTimeout": null, - "datasource": "Loki", + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, "description": "", "fieldConfig": { "defaults": { - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "0", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "color": "#299c46", + "text": "0" + } + }, + "type": "special" } ], "max": 100, "min": 0, "noValue": "0", - "nullValueMode": "connected", "thresholds": { "mode": "absolute", "steps": [ @@ -310,10 +306,11 @@ "y": 4 }, "id": 9, - "interval": null, "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "auto", "reduceOptions": { "calcs": [ @@ -325,23 +322,28 @@ "showThresholdLabels": false, "showThresholdMarkers": false }, - "pluginVersion": "7.1.4", + "pluginVersion": "10.2.2", "targets": [ { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, "expr": "sum(count_over_time(({container_name=\"$container_name\"} |~ \"(?i)$searchable_pattern\")[$__interval])) * 100 / sum(count_over_time(({container_name=\"$container_name\"})[$__interval]))", "hide": false, "legendFormat": "%", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Percentage of \"$searchable_pattern\" for specified time", "type": "gauge" }, { "collapsed": false, - "datasource": null, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, "gridPos": { "h": 1, "w": 24, @@ -350,19 +352,61 @@ }, "id": 37, "panels": [], - "title": "Frontend", + "repeat": "endpoint", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "refId": "A" + } + ], + "title": "Endpoint: $endpoint", "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { + "color": { + "mode": "palette-classic" + }, "custom": { - "align": null + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, "mappings": [], "thresholds": { @@ -377,193 +421,90 @@ "value": 80 } ] - } + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, - "w": 12, + "w": 7, "x": 0, "y": 13 }, - "hiddenSeries": false, "id": 13, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.2.2", "targets": [ { - "expr": "rate(hotrod_frontend_http_requests_total[5m])", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(hotrod_http_requests_total{endpoint=~\"$endpoint\"}[5m])", "interval": "", "legendFormat": "{{status_code}}", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Frontend HTTP response codes", - "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 - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 13 - }, - "hiddenSeries": false, - "id": 25, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(hotrod_frontend_requests_total[5m])", - "interval": "", - "legendFormat": "{{endpoint}} error: {{error}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Frontend requests total", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" }, - "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": "Prometheus", + "description": "", "fieldConfig": { "defaults": { + "color": { + "mode": "palette-classic" + }, "custom": { - "align": null + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, "mappings": [], "thresholds": { @@ -578,101 +519,90 @@ "value": 80 } ] - }, - "unit": "s" + } }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, - "w": 12, - "x": 0, - "y": 21 + "w": 8, + "x": 7, + "y": 13 }, - "hiddenSeries": false, - "id": 23, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false + "id": 25, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.2.2", "targets": [ { - "expr": "rate(hotrod_frontend_request_latency_count[5m])", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "sum(rate(hotrod_http_requests_total{endpoint=\"/\"}[5m])) by (error)", "interval": "", - "legendFormat": "{{endpoint}} - error: {{error}}", + "legendFormat": "{{endpoint}} error: {{error}}", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Frontend request latency count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "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 - } + "title": "Frontend requests total", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "description": "", "fieldConfig": { "defaults": { - "custom": {}, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, "mappings": [], "thresholds": { "mode": "absolute", @@ -691,1541 +621,166 @@ }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 21 + "w": 9, + "x": 15, + "y": 13 }, - "hiddenSeries": false, "id": 15, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.2.2", "targets": [ { - "expr": "histogram_quantile(0.99, sum(rate(hotrod_frontend_request_latency_bucket[5m])) by (le))", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.99, sum(rate(hotrod_request_latency_bucket{endpoint=\"/\"}[5m])) by (le))", "interval": "", "legendFormat": "P99", + "range": true, "refId": "A" }, { - "expr": "histogram_quantile(0.95, sum(rate(hotrod_frontend_request_latency_bucket[5m])) by (le))", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.95, sum(rate(hotrod_request_latency_bucket{endpoint=\"/\"}[5m])) by (le))", "interval": "", "legendFormat": "P95", + "range": true, "refId": "B" }, { - "expr": "histogram_quantile(0.50, sum(rate(hotrod_frontend_request_latency_bucket[5m])) by (le))", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.50, sum(rate(hotrod_request_latency_bucket{endpoint=\"/\"}[5m])) by (le))", "interval": "", "legendFormat": "P50", + "range": true, "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Frontend latency percentiles", - "tooltip": { - "shared": true, + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "tags": [ + "Loki", + "logging", + "prometheus", + "metrics", + "jaeger", + "hotrod" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "grafana-integration-hotrod-1", + "value": "grafana-integration-hotrod-1" + }, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "definition": "label_values({container_name=~\".+\"}, container_name)", + "hide": 0, + "includeAll": false, + "label": "Service", + "multi": false, + "name": "container_name", + "options": [], + "query": "label_values({container_name=~\".+\"}, container_name)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, "sort": 0, - "value_type": "individual" + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + { + "current": { + "selected": true, + "text": "error", + "value": "error" + }, + "hide": 0, + "label": "Search (case insensitive)", + "name": "searchable_pattern", + "options": [ + { + "selected": true, + "text": "error", + "value": "error" + } + ], + "query": "error", + "skipUrlSync": false, + "type": "textbox" }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 29 - }, - "id": 21, - "panels": [], - "title": "Route", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 30 - }, - "hiddenSeries": false, - "id": 38, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(hotrod_route_http_requests_total[5m])", - "interval": "", - "legendFormat": "{{status_code}} {{endpoint }} ", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Route HTTP response codes", - "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": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 30 - }, - "hiddenSeries": false, - "id": 39, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(hotrod_route_requests_total[5m])", - "interval": "", - "legendFormat": "{{endpoint }} {{error}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Route requests total", - "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": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 38 - }, - "hiddenSeries": false, - "id": 40, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(hotrod_route_request_latency_count[5m])", - "interval": "", - "legendFormat": "{{endpoint}} - error: {{error}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Route request latency count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "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": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 38 - }, - "hiddenSeries": false, - "id": 41, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(hotrod_route_request_latency_bucket[5m])) by (le))", - "interval": "", - "legendFormat": "P99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, sum(rate(hotrod_route_request_latency_bucket[5m])) by (le))", - "interval": "", - "legendFormat": "P95", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.50, sum(rate(hotrod_route_request_latency_bucket[5m])) by (le))", - "interval": "", - "legendFormat": "P50", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Route latency percentiles", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "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 - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 46 - }, - "id": 19, - "panels": [], - "title": "Customer", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 47 - }, - "hiddenSeries": false, - "id": 26, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(hotrod_customer_http_requests_total[5m])", - "interval": "", - "legendFormat": "{{status_code}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Customer HTTP response codes", - "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": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 47 - }, - "hiddenSeries": false, - "id": 27, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(hotrod_customer_requests_total[5m])", - "interval": "", - "legendFormat": "{{endpoint}} {{error}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Customer requests total", - "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": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 55 - }, - "hiddenSeries": false, - "id": 32, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(hotrod_customer_request_latency_count[5m])", - "interval": "", - "legendFormat": "{{endpoint}} - error: {{error}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Customer request latency count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "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": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 55 - }, - "hiddenSeries": false, - "id": 33, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(hotrod_customer_request_latency_bucket[5m])) by (le))", - "interval": "", - "legendFormat": "P99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, sum(rate(hotrod_customer_request_latency_bucket[5m])) by (le))", - "interval": "", - "legendFormat": "P95", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.50, sum(rate(hotrod_customer_request_latency_bucket[5m])) by (le))", - "interval": "", - "legendFormat": "P50", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Customer latency percentiles", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "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 - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 63 - }, - "id": 17, - "panels": [], - "title": "Driver", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 64 - }, - "hiddenSeries": false, - "id": 30, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(hotrod_driver_http_requests_total[5m])", - "interval": "", - "legendFormat": "{{status_code}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Driver HTTP response codes", - "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": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 64 - }, - "hiddenSeries": false, - "id": 31, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(hotrod_driver_requests_total[5m])", - "interval": "", - "legendFormat": "{{endpoint}} error: {{error}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Driver HTTP response codes", - "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": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 72 - }, - "hiddenSeries": false, - "id": 34, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(hotrod_driver_request_latency_count[5m])", - "interval": "", - "legendFormat": "{{endpoint}} - error: {{error}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Driver request latency count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "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": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 72 - }, - "hiddenSeries": false, - "id": 35, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "percentage": false, - "pluginVersion": "7.1.4", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.99, sum(rate(hotrod_driver_request_latency_bucket[5m])) by (le))", - "interval": "", - "legendFormat": "P99", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, sum(rate(hotrod_driver_request_latency_bucket[5m])) by (le))", - "interval": "", - "legendFormat": "P95", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.50, sum(rate(hotrod_driver_request_latency_bucket[5m])) by (le))", - "interval": "", - "legendFormat": "P50", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Driver latency percentiles", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "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": "5s", - "schemaVersion": 26, - "style": "dark", - "tags": [ - "Loki", - "logging", - "prometheus", - "metrics", - "jaeger", - "hotrod" - ], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "grafana-jaeger-integration_hotrod_1", - "value": "grafana-jaeger-integration_hotrod_1" + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" }, - "datasource": "Loki", - "definition": "label_values({container_name=~\".+\"}, container_name)", + "definition": "label_values(hotrod_requests_total,endpoint)", "hide": 0, - "includeAll": false, + "includeAll": true, "label": "Service", - "multi": false, - "name": "container_name", + "multi": true, + "name": "endpoint", "options": [], - "query": "label_values({container_name=~\".+\"}, container_name)", + "query": { + "qryType": 1, + "query": "label_values(hotrod_requests_total,endpoint)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, "refresh": 2, "regex": "", "skipUrlSync": false, - "sort": 0, + "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false - }, - { - "current": { - "selected": false, - "text": "error", - "value": "error" - }, - "hide": 0, - "label": "Search (case insensitive)", - "name": "searchable_pattern", - "options": [ - { - "selected": true, - "text": "error", - "value": "error" - } - ], - "query": "error", - "skipUrlSync": false, - "type": "textbox" } ] }, "time": { - "from": "now-5m", + "from": "now-15m", "to": "now" }, "timepicker": { @@ -2244,5 +799,6 @@ "timezone": "", "title": "HotROD - Metrics and Logs Overview", "uid": "fRIvzUZMz", - "version": 1 -} \ No newline at end of file + "version": 1, + "weekStart": "" +} diff --git a/examples/grafana-integration/prometheus/prometheus.yml b/examples/grafana-integration/prometheus/prometheus.yml index 6a3c9d84a9c..96ca1cc0fc3 100644 --- a/examples/grafana-integration/prometheus/prometheus.yml +++ b/examples/grafana-integration/prometheus/prometheus.yml @@ -1,6 +1,6 @@ global: - scrape_interval: 15s - evaluation_interval: 15s + scrape_interval: 15s + evaluation_interval: 15s scrape_configs: - job_name: 'prometheus' @@ -12,5 +12,4 @@ scrape_configs: - job_name: 'hotrod-application' static_configs: - targets: - - hotrod:8083 - + - hotrod:8080