From 6d556f5ad1e4bd9d28013652bf3e1c1f48352d12 Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Thu, 11 May 2023 15:23:35 +0200 Subject: [PATCH] foo --- README.md | 50 ++-- compose.metrics.yml | 79 ------ compose.yml | 78 +++++- demo.yml | 3 + grafana-swarm-dashboard.json | 497 +++++++++++++++------------------ grafana-traefik-dashboard.json | 477 ++++++++++++++++--------------- scrape-config.example.yml | 2 +- 7 files changed, 588 insertions(+), 598 deletions(-) delete mode 100644 compose.metrics.yml create mode 100644 demo.yml diff --git a/README.md b/README.md index ab23e6f..6fa37ec 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,7 @@ Where gathering.org is the node you want to gather metrics from. * `abra app deploy traefik` (might need to undeploy before) 1. `abra app new monitoring-ng` 1. `abra app config monitoring.gathering.org` - for gathering only this is required: - `COMPOSE_FILE="$COMPOSE_FILE:compose.metrics.yml"` + for gathering only the main `compose.yml` is needed, nothing more. 1. `abra app deploy monitoring.gathering.org` 1. check that endpoints are up and basic-auth works * cadvisor.monitoring.gathering.org @@ -51,7 +50,10 @@ Where gathering.org is the node you want to gather metrics from. * monitoring.example.org * loki.monitoring.example.org * loki.monitoring.example.org - +1. Setup monitoring stack + * `abra app new monitoring-ng` + * `abra app config monitoring.example.org` + * ``` cp scrape-config.example.yml gathering.org.yml @@ -79,29 +81,29 @@ abra app cp monitoring.dev.local-it.cloud gathering.org.yml prometheus:/promethe | Cadvisor | traefik basic-auth | cadvisor.monitoring.example.org | | Node Exporter | traefik basic-auth | node.monitoring.example.org | - - ### TODO -* metrics.compose.yml -> compose.yml -* Grafana - * [ ] Test SSO -* Loki - * [ ] s3 aws secret? - * [ ] understand config, make it sane -* [ ] Promtail - * [ ] make it work -* prometheus retention! -* traefik metrics -* [uptime-kuma](https://github.com/louislam/uptime-kuma/wiki/Prometheus-Integration), [dashboard](https://grafana.com/grafana/dashboards/14847-uptime-kuma/) -* authentik metrics? -* cool alerts -* note: alle gathering nodes will have the same httpasswd basic-auth secret ... - -> this could be a use case to actually use docker swarm ... - could use swarm_service_discovery then in prometheus - -> multiple scrape_configs in prometheus - service - -> oauth / header? prometheus could do it, does promtail? does traefik? +todo: + * [x] metrics.compose.yml -> compose.yml + * Grafana + * [ ] Test SSO + * Loki + * [ ] s3 aws secret? + * [ ] understand config, make it sane + * [ ] Promtail + * [x] make it work + * [ ] test it with second server + * [ ] prometheus retention / storage size limit + * [x] traefik metrics + * [ ] document example scrape config prometheus + +nice to have: + * [uptime-kuma](https://github.com/louislam/uptime-kuma/wiki/Prometheus-Integration), [dashboard](https://grafana.com/grafana/dashboards/14847-uptime-kuma/) + * authentik metrics? + * improve prometheus discovery / security things + -> multiple scrape_configs in prometheus + service + -> oauth / header? prometheus could do it, does promtail? does traefik? This stack requires 3 domains, one for grafana, prometheus, loki. This is due to the need for the gathering tools, such as node_exporter, to have a publicy accessible URL for making connections. We make use of the internal prometheus HTTP basic auth & wire up an Nginx proxy with HTTP basic auth for loki. Grafana uses Keycloak OpenId Connect sign in. The alertmanager setup remains internal and is only connected with grafana. It also assume that you are deploying the [`coop-cloud/gathering`](https://git.coopcloud.tech/knoflook/gathering/) recipe on the machines that you want to gather metrics & logs from. Each instance of the gathering recipe will report back and/or be scraped by your central install of monitoring-lite. diff --git a/compose.metrics.yml b/compose.metrics.yml deleted file mode 100644 index d6961d7..0000000 --- a/compose.metrics.yml +++ /dev/null @@ -1,79 +0,0 @@ -version: '3.8' - -services: - node_exporter: - image: prom/node-exporter:v1.0.1 - user: root - environment: - - NODE_ID={{.Node.ID}} - volumes: - - /proc:/host/proc:ro - - /sys:/host/sys:ro - - /:/rootfs:ro - - /etc/hostname:/etc/nodename:ro - command: - - "--path.sysfs=/host/sys" - - "--path.procfs=/host/proc" - - "--path.rootfs=/rootfs" - - "--collector.textfile.directory=/etc/node-exporter/" - - "--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)" - - "--no-collector.ipvs" - configs: - - source: node_exporter_entrypoint_sh - target: /entrypoint.sh - networks: - - internal - - proxy - entrypoint: [ "/bin/sh", "-e", "/entrypoint.sh" ] - deploy: - restart_policy: - condition: on-failure - labels: - - "traefik.enable=true" - - "traefik.http.services.${STACK_NAME}-node.loadbalancer.server.port=9100" - - "traefik.http.routers.${STACK_NAME}-node.rule=Host(`node.${DOMAIN}`)" - - "traefik.http.routers.${STACK_NAME}-node.entrypoints=web-secure" - - "traefik.http.routers.${STACK_NAME}-node.tls=true" - - "traefik.http.routers.${STACK_NAME}-node.tls.certresolver=${LETS_ENCRYPT_ENV}" - - "traefik.http.routers.${STACK_NAME}-node.middlewares=basicauth@file" - - cadvisor: - image: gcr.io/cadvisor/cadvisor:v0.47.0 - command: - - "-logtostderr" - - "-docker_only" - - "--enable_metrics=cpu,cpuLoad,disk,memory,network" - # all possible metrics: advtcp,app,cpu,cpuLoad,cpu_topology,cpuset,disk,diskIO,hugetlb,memory,memory_numa,network,oom_event,percpu,perf_event,process,referenced_memory,resctrl,sched,tcp,udp. - - "--housekeeping_interval=60s" - - volumes: - - /var/lib/docker/:/var/lib/docker:ro - - /dev/disk/:/dev/disk:ro - - /sys:/sys:ro - - /var/run:/var/run:ro - - /:/rootfs:ro - networks: - - internal - - proxy - deploy: - restart_policy: - condition: on-failure - labels: - - "traefik.enable=true" - - "traefik.http.services.${STACK_NAME}-cadvisor.loadbalancer.server.port=8080" - - "traefik.http.routers.${STACK_NAME}-cadvisor.rule=Host(`cadvisor.${DOMAIN}`)" - - "traefik.http.routers.${STACK_NAME}-cadvisor.entrypoints=web-secure" - - "traefik.http.routers.${STACK_NAME}-cadvisor.tls=true" - - "traefik.http.routers.${STACK_NAME}-cadvisor.tls.certresolver=${LETS_ENCRYPT_ENV}" - - "traefik.http.routers.${STACK_NAME}-cadvisor.middlewares=basicauth@file" - healthcheck: - test: wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1 - interval: 15s - timeout: 15s - retries: 5 - start_period: 30s - -configs: - node_exporter_entrypoint_sh: - name: ${STACK_NAME}_node_exporter_entrypoint_${NODE_EXPORTER_ENTRYPOINT_VERSION} - file: node-exporter-entrypoint.sh diff --git a/compose.yml b/compose.yml index ef8b722..67fa573 100644 --- a/compose.yml +++ b/compose.yml @@ -3,8 +3,82 @@ version: "3.8" services: app: - image: debian:stable-slim - entrypoint: "/bin/tail -f /dev/null" + image: prom/node-exporter:v1.0.1 + user: root + environment: + - NODE_ID={{.Node.ID}} + volumes: + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro + - /etc/hostname:/etc/nodename:ro + command: + - "--path.sysfs=/host/sys" + - "--path.procfs=/host/proc" + - "--path.rootfs=/rootfs" + - "--collector.textfile.directory=/etc/node-exporter/" + - "--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)" + - "--no-collector.ipvs" + configs: + - source: node_exporter_entrypoint_sh + target: /entrypoint.sh + networks: + - internal + - proxy + entrypoint: [ "/bin/sh", "-e", "/entrypoint.sh" ] + deploy: + restart_policy: + condition: on-failure + labels: + - "traefik.enable=true" + - "traefik.http.services.${STACK_NAME}-node.loadbalancer.server.port=9100" + - "traefik.http.routers.${STACK_NAME}-node.rule=Host(`node.${DOMAIN}`)" + - "traefik.http.routers.${STACK_NAME}-node.entrypoints=web-secure" + - "traefik.http.routers.${STACK_NAME}-node.tls=true" + - "traefik.http.routers.${STACK_NAME}-node.tls.certresolver=${LETS_ENCRYPT_ENV}" + - "traefik.http.routers.${STACK_NAME}-node.middlewares=basicauth@file" + + cadvisor: + image: gcr.io/cadvisor/cadvisor:v0.47.0 + command: + - "-logtostderr" + - "-docker_only" + - "--enable_metrics=cpu,cpuLoad,disk,memory,network" + # all possible metrics: advtcp,app,cpu,cpuLoad,cpu_topology,cpuset,disk,diskIO,hugetlb,memory,memory_numa,network,oom_event,percpu,perf_event,process,referenced_memory,resctrl,sched,tcp,udp. + - "--housekeeping_interval=60s" + + volumes: + - /var/lib/docker/:/var/lib/docker:ro + - /dev/disk/:/dev/disk:ro + - /sys:/sys:ro + - /var/run:/var/run:ro + - /:/rootfs:ro + networks: + - internal + - proxy + deploy: + restart_policy: + condition: on-failure + labels: + - "traefik.enable=true" + - "traefik.http.services.${STACK_NAME}-cadvisor.loadbalancer.server.port=8080" + - "traefik.http.routers.${STACK_NAME}-cadvisor.rule=Host(`cadvisor.${DOMAIN}`)" + - "traefik.http.routers.${STACK_NAME}-cadvisor.entrypoints=web-secure" + - "traefik.http.routers.${STACK_NAME}-cadvisor.tls=true" + - "traefik.http.routers.${STACK_NAME}-cadvisor.tls.certresolver=${LETS_ENCRYPT_ENV}" + - "traefik.http.routers.${STACK_NAME}-cadvisor.middlewares=basicauth@file" + healthcheck: + test: wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1 + interval: 15s + timeout: 15s + retries: 5 + start_period: 30s + +configs: + node_exporter_entrypoint_sh: + name: ${STACK_NAME}_node_exporter_entrypoint_${NODE_EXPORTER_ENTRYPOINT_VERSION} + file: node-exporter-entrypoint.sh + networks: diff --git a/demo.yml b/demo.yml new file mode 100644 index 0000000..71b46a9 --- /dev/null +++ b/demo.yml @@ -0,0 +1,3 @@ +- targets: + - 'node.monitoring.demo.local-it.cloud' + - 'cadvisor.monitoring.demo.local-it.cloud' diff --git a/grafana-swarm-dashboard.json b/grafana-swarm-dashboard.json index 6c9468a..a8db449 100644 --- a/grafana-swarm-dashboard.json +++ b/grafana-swarm-dashboard.json @@ -8,21 +8,31 @@ "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" } ] }, "description": "Docker Swarm nodes metrics", "editable": true, + "fiscalYearStartMonth": 0, "gnetId": 7461, "graphTooltip": 0, - "id": 1, - "iteration": 1626741910840, + "id": 3, + "iteration": 1683802396909, "links": [], + "liveNow": false, "panels": [ { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { "decimals": 1, @@ -60,13 +70,12 @@ }, "gridPos": { "h": 4, - "w": 6, + "w": 4, "x": 0, "y": 0 }, "hideTimeOverride": true, "id": 2, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -84,7 +93,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "targets": [ { "expr": "topk(1, sum((node_time_seconds - node_boot_time_seconds) * on(instance) group_left(node_name) node_meta{node_name=~\"$node_id\"}) by (node_name))", @@ -96,13 +105,14 @@ } ], "timeFrom": "1m", - "timeShift": null, "title": "Uptime", "type": "stat" }, { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { "decimals": 0, @@ -136,12 +146,11 @@ }, "gridPos": { "h": 4, - "w": 6, - "x": 6, + "w": 2, + "x": 4, "y": 0 }, "id": 1, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -159,7 +168,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "targets": [ { "expr": "count(node_meta * on(instance) group_left(node_name) node_meta{node_name=~\"$node_id\"})", @@ -174,8 +183,10 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { "decimals": 0, @@ -209,13 +220,12 @@ }, "gridPos": { "h": 4, - "w": 6, - "x": 12, + "w": 2, + "x": 6, "y": 0 }, "hideTimeOverride": true, "id": 4, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -233,7 +243,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "targets": [ { "expr": "count(node_cpu_seconds_total{mode=\"idle\"} * on(instance) group_left(node_name) node_meta{node_name=~\"$node_id\"})", @@ -245,13 +255,14 @@ } ], "timeFrom": "1m", - "timeShift": null, "title": "CPUs", "type": "stat" }, { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { "mappings": [ @@ -290,13 +301,12 @@ }, "gridPos": { "h": 4, - "w": 6, - "x": 18, + "w": 3, + "x": 8, "y": 0 }, "hideTimeOverride": true, "id": 11, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -312,7 +322,7 @@ "showThresholdMarkers": true, "text": {} }, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "targets": [ { "expr": "sum(irate(node_cpu_seconds_total{mode=\"idle\"}[$interval]) * on(instance) group_left(node_name) node_meta{node_name=~\"$node_id\"}) * 100 / count(node_cpu_seconds_total{mode=\"user\"} * on(instance) group_left(node_name) node_meta{node_name=~\"$node_id\"}) ", @@ -324,7 +334,6 @@ } ], "timeFrom": "1m", - "timeShift": null, "title": "CPU Idle", "type": "gauge" }, @@ -333,15 +342,18 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "decimals": 2, "fill": 1, "fillGradient": 0, "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 4 + "h": 8, + "w": 13, + "x": 11, + "y": 0 }, "hiddenSeries": false, "id": 13, @@ -366,7 +378,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -386,9 +398,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "System Load by Node", "tooltip": { "shared": true, @@ -397,135 +407,31 @@ }, "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 + "align": false } }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "decimals": 2, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 4 + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "hideZero": true, - "max": true, - "min": true, - "rightSide": true, - "show": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "100 - (avg(irate(node_cpu_seconds_total{mode=\"idle\"}[$interval]) * on(instance) group_left(node_name) node_meta{node_name=~\"$node_id\"} * 100) by (node_name))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{node_name}}", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU Usage by Node", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": "100", - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "cacheTimeout": null, - "datasource": "Prometheus", "fieldConfig": { "defaults": { "color": { @@ -558,13 +464,12 @@ }, "gridPos": { "h": 4, - "w": 6, + "w": 3, "x": 0, - "y": 11 + "y": 4 }, "hideTimeOverride": true, "id": 3, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -582,7 +487,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "targets": [ { "expr": "sum(node_memory_MemTotal_bytes * on(instance) group_left(node_name) node_meta{node_name=~\"$node_id\"})", @@ -593,14 +498,14 @@ "step": 20 } ], - "timeFrom": null, - "timeShift": null, "title": "Total Memory", "type": "stat" }, { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { "mappings": [ @@ -639,12 +544,11 @@ }, "gridPos": { "h": 4, - "w": 6, - "x": 6, - "y": 11 + "w": 3, + "x": 3, + "y": 4 }, "id": 8, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -660,7 +564,7 @@ "showThresholdMarkers": true, "text": {} }, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "targets": [ { "expr": "sum((node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * on(instance) group_left(node_name) node_meta{node_name=~\"$node_id\"} * 100) / count(node_meta * on(instance) group_left(node_name) node_meta{node_name=~\"$node_id\"})", @@ -675,8 +579,10 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { "color": { @@ -709,13 +615,12 @@ }, "gridPos": { "h": 4, - "w": 6, - "x": 12, - "y": 11 + "w": 2, + "x": 6, + "y": 4 }, "hideTimeOverride": true, "id": 9, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -733,7 +638,7 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "targets": [ { "exemplar": true, @@ -746,14 +651,14 @@ "step": 20 } ], - "timeFrom": null, - "timeShift": null, "title": "Total Disk Space", "type": "stat" }, { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { "mappings": [ @@ -792,12 +697,11 @@ }, "gridPos": { "h": 4, - "w": 6, - "x": 18, - "y": 11 + "w": 3, + "x": 8, + "y": 4 }, "id": 10, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -813,7 +717,7 @@ "showThresholdMarkers": true, "text": {} }, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "targets": [ { "exemplar": true, @@ -834,7 +738,100 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "decimals": 2, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 8 + }, + "hiddenSeries": false, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.4.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "100 - (avg(irate(node_cpu_seconds_total{mode=\"idle\"}[$interval]) * on(instance) group_left(node_name) node_meta{node_name=~\"$node_id\"} * 100) by (node_name))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{node_name}}", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "CPU Usage by Node", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "logBase": 1, + "max": "100", + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -864,7 +861,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -892,9 +889,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Memory usage by Node", "tooltip": { "shared": true, @@ -903,33 +898,24 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "decbytes", - "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 + "align": false } }, { @@ -937,7 +923,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "decimals": 2, "fill": 1, "fillGradient": 0, @@ -968,7 +957,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -996,9 +985,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Disk I/O by Node", "tooltip": { "shared": true, @@ -1007,33 +994,24 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "Bps", - "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 + "align": false } }, { @@ -1041,7 +1019,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "decimals": 2, "fill": 1, "fillGradient": 0, @@ -1072,7 +1053,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -1099,9 +1080,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "IOPS by Node", "tooltip": { "shared": true, @@ -1110,33 +1089,24 @@ }, "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 + "align": false } }, { @@ -1144,7 +1114,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "decimals": 2, "fill": 1, "fillGradient": 0, @@ -1177,7 +1150,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -1196,9 +1169,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "CPU IO Wait by Node", "tooltip": { "shared": true, @@ -1207,33 +1178,24 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "percent", - "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 + "align": false } }, { @@ -1241,7 +1203,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "decimals": 0, "fill": 3, "fillGradient": 0, @@ -1276,7 +1241,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -1296,9 +1261,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Running Containers by Service", "tooltip": { "shared": true, @@ -1307,38 +1270,27 @@ }, "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 + "align": false } }, { - "cacheTimeout": null, - "datasource": "Prometheus", "fieldConfig": { "defaults": { "color": { @@ -1381,7 +1333,6 @@ "y": 36 }, "id": 7, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -1399,12 +1350,19 @@ "text": {}, "textMode": "auto" }, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, "expr": "count(rate(container_last_seen[5m]) * on(container_label_com_docker_swarm_node_id) group_left(node_name) node_meta{node_name=~\"$node_id\"})", "format": "time_series", + "interval": "", "intervalFactor": 2, + "legendFormat": "", "refId": "A", "step": 20 } @@ -1417,7 +1375,10 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fill": 1, "fillGradient": 0, "gridPos": { @@ -1447,7 +1408,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "8.0.6", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -1477,9 +1438,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Containers Network Traffic by Node", "tooltip": { "shared": true, @@ -1488,38 +1447,32 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "Bps", - "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 + "align": false } }, { "columns": [], - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fontSize": "100%", "gridPos": { "h": 7, @@ -1530,7 +1483,6 @@ "hideTimeOverride": true, "id": 20, "links": [], - "pageSize": null, "scroll": true, "showHeader": true, "sort": { @@ -1548,7 +1500,6 @@ { "alias": "", "align": "auto", - "colorMode": null, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", @@ -1577,7 +1528,7 @@ } ], "refresh": "5s", - "schemaVersion": 30, + "schemaVersion": 35, "style": "dark", "tags": [ "swarmprom", @@ -1590,14 +1541,15 @@ { "allValue": ".+", "current": { - "selected": false, + "selected": true, "text": "All", "value": "$__all" }, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "definition": "", - "description": null, - "error": null, "hide": 0, "includeAll": true, "label": "Swarm Node", @@ -1623,8 +1575,6 @@ "text": "1m", "value": "1m" }, - "description": null, - "error": null, "hide": 0, "label": "Interval", "name": "interval", @@ -1725,5 +1675,6 @@ "timezone": "", "title": "Docker Swarm Nodes", "uid": "BPlb-Sgik", - "version": 4 -} + "version": 28, + "weekStart": "" +} \ No newline at end of file diff --git a/grafana-traefik-dashboard.json b/grafana-traefik-dashboard.json index 78b6c14..4041c65 100644 --- a/grafana-traefik-dashboard.json +++ b/grafana-traefik-dashboard.json @@ -8,35 +8,41 @@ "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" } ] }, "description": "Simple dashboard for Traefik 2", "editable": true, + "fiscalYearStartMonth": 0, "gnetId": 11462, "graphTooltip": 0, - "id": 4, - "iteration": 1628548257934, + "id": 2, + "iteration": 1683809163696, "links": [], + "liveNow": false, "panels": [ { - "cacheTimeout": null, - "datasource": "Prometheus", "fieldConfig": { "defaults": { - "custom": {}, "decimals": 0, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], - "nullValueMode": "connected", "thresholds": { "mode": "absolute", "steps": [ @@ -65,7 +71,6 @@ "y": 0 }, "id": 22, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -82,15 +87,20 @@ }, "textMode": "auto" }, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": false, "expr": "time() - process_start_time_seconds{job=\"$job\"}", "format": "time_series", "instant": true, "interval": "", "intervalFactor": 2, - "legendFormat": "", + "legendFormat": "{{ instance }}", "refId": "A" } ], @@ -98,22 +108,25 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { - "custom": {}, "decimals": 0, "mappings": [ { - "id": 0, - "op": "=", - "text": "0", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "color": "#37872D", + "text": "0" + } + }, + "type": "special" } ], - "nullValueMode": "connected", "thresholds": { "mode": "absolute", "steps": [ @@ -142,7 +155,6 @@ "y": 0 }, "id": 32, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -159,7 +171,7 @@ }, "textMode": "auto" }, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "targets": [ { "expr": "sum(increase(traefik_service_requests_total{code=\"499\"}[$interval]))", @@ -168,28 +180,28 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Max Service Error count ($interval)", "type": "stat" }, { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { - "custom": {}, "decimals": 0, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], - "nullValueMode": "connected", "thresholds": { "mode": "absolute", "steps": [ @@ -218,7 +230,6 @@ "y": 0 }, "id": 26, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -235,7 +246,7 @@ }, "textMode": "auto" }, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "targets": [ { "expr": "sum(increase(traefik_service_requests_total{code=\"404\",protocol=~\"$protocol\"}[$interval]))", @@ -251,23 +262,25 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "description": "", "fieldConfig": { "defaults": { - "custom": {}, "decimals": 0, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], - "nullValueMode": "connected", "thresholds": { "mode": "absolute", "steps": [ @@ -296,7 +309,6 @@ "y": 0 }, "id": 33, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -313,7 +325,7 @@ }, "textMode": "auto" }, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "targets": [ { "expr": "sum(increase(traefik_service_requests_total{code=\"200\",protocol=~\"$protocol\"}[$interval]))", @@ -332,19 +344,15 @@ { "aliasColors": {}, "breakPoint": "50%", - "cacheTimeout": null, "combine": { "label": "Others", "threshold": 0 }, - "datasource": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" }, + "description": "", "fontSize": "80%", "format": "short", "gridPos": { @@ -354,12 +362,9 @@ "y": 0 }, "id": 18, - "interval": null, "legend": { "percentage": true, "show": true, - "sort": null, - "sortDesc": null, "values": true }, "legendType": "Right side", @@ -386,11 +391,13 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "decimals": 0, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -424,7 +431,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -444,9 +451,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Bad Status Code Count", "tooltip": { "shared": true, @@ -455,9 +460,7 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -465,24 +468,17 @@ { "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -490,11 +486,13 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "description": "", "fieldConfig": { "defaults": { - "custom": {}, "links": [], "unit": "ms" }, @@ -529,7 +527,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -550,9 +548,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Average processing time", "tooltip": { "shared": true, @@ -561,51 +557,45 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "ms", - "label": null, "logBase": 10, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], - "nullValueMode": "connected", "thresholds": { "mode": "absolute", "steps": [ @@ -642,7 +632,6 @@ "y": 6 }, "id": 20, - "interval": null, "links": [], "maxDataPoints": 100, "options": { @@ -659,7 +648,7 @@ }, "textMode": "auto" }, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "targets": [ { "expr": "sum(traefik_entrypoint_request_duration_seconds_sum) / sum(traefik_entrypoint_requests_total) * 1000", @@ -676,10 +665,12 @@ "bars": true, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -714,7 +705,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -733,9 +724,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Total requests", "tooltip": { "shared": true, @@ -744,9 +733,7 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -754,10 +741,7 @@ { "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true }, { @@ -765,21 +749,20 @@ "format": "short", "label": "", "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { - "custom": {}, "links": [], "mappings": [], "thresholds": { @@ -821,7 +804,7 @@ }, "textMode": "auto" }, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "targets": [ { "expr": "sum(rate(traefik_service_requests_total[$interval]))", @@ -831,20 +814,115 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Requests per second", "type": "stat" }, + { + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 35, + "links": [], + "maxDataPoints": 100, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "right" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "rate(traefik_service_request_duration_seconds_sum[5m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ service }}", + "refId": "A" + } + ], + "title": "Average response time by Service", + "type": "timeseries" + }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -855,7 +933,7 @@ "h": 6, "w": 10, "x": 0, - "y": 18 + "y": 26 }, "hiddenSeries": false, "id": 8, @@ -876,7 +954,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -896,9 +974,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Used sockets", "tooltip": { "shared": true, @@ -907,33 +983,24 @@ }, "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 + "align": false } }, { @@ -941,11 +1008,13 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "decimals": 0, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -956,7 +1025,7 @@ "h": 6, "w": 14, "x": 10, - "y": 18 + "y": 26 }, "hiddenSeries": false, "id": 24, @@ -981,7 +1050,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -1001,9 +1070,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Access to services", "tooltip": { "shared": true, @@ -1012,9 +1079,7 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -1022,24 +1087,17 @@ { "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -1047,10 +1105,12 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -1061,7 +1121,7 @@ "h": 7, "w": 12, "x": 0, - "y": 24 + "y": 32 }, "hiddenSeries": false, "id": 30, @@ -1086,7 +1146,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -1104,9 +1164,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "ENTRYPOINT - Open Connections", "tooltip": { "shared": true, @@ -1115,9 +1173,7 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -1125,24 +1181,17 @@ { "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -1150,10 +1199,12 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -1164,7 +1215,7 @@ "h": 7, "w": 12, "x": 12, - "y": 24 + "y": 32 }, "hiddenSeries": false, "id": 28, @@ -1189,7 +1240,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -1207,9 +1258,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "SERVICE - Open Connections", "tooltip": { "shared": true, @@ -1218,9 +1267,7 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -1228,24 +1275,17 @@ { "decimals": 0, "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -1253,11 +1293,13 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "decimals": 0, "fieldConfig": { "defaults": { - "custom": {}, "links": [] }, "overrides": [] @@ -1268,7 +1310,7 @@ "h": 7, "w": 24, "x": 0, - "y": 31 + "y": 39 }, "hiddenSeries": false, "id": 12, @@ -1291,7 +1333,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.3.5", + "pluginVersion": "8.4.4", "pointradius": 5, "points": false, "renderer": "flot", @@ -1315,9 +1357,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Status Code Count ", "tooltip": { "shared": true, @@ -1326,9 +1366,7 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -1338,27 +1376,22 @@ "format": "short", "label": "", "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], - "refresh": "", - "schemaVersion": 26, + "refresh": "5s", + "schemaVersion": 35, "style": "dark", "tags": [ "traefik", @@ -1369,55 +1402,61 @@ "templating": { "list": [ { - "allValue": null, "current": { "selected": false, - "text": "traefik", - "value": "traefik" + "text": "default", + "value": "default" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" }, - "datasource": "Prometheus", "definition": "", - "error": null, "hide": 0, "includeAll": false, "label": "Job:", "multi": false, "name": "job", "options": [], - "query": "label_values(job)", + "query": { + "query": "label_values(job)", + "refId": "Prometheus-job-Variable-Query" + }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 2, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { "selected": false, "text": "All", "value": "$__all" }, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, "definition": "label_values(traefik_service_requests_total, protocol)", - "error": null, "hide": 0, "includeAll": true, "label": "Service:", "multi": true, "name": "protocol", "options": [], - "query": "label_values(traefik_service_requests_total, protocol)", + "query": { + "query": "label_values(traefik_service_requests_total, protocol)", + "refId": "Prometheus-protocol-Variable-Query" + }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -1428,16 +1467,15 @@ "auto_min": "10s", "current": { "selected": false, - "text": "auto", - "value": "$__auto_interval_interval" + "text": "1h", + "value": "1h" }, - "error": null, "hide": 0, "label": "Interval", "name": "interval", "options": [ { - "selected": true, + "selected": false, "text": "auto", "value": "$__auto_interval_interval" }, @@ -1457,7 +1495,7 @@ "value": "30m" }, { - "selected": false, + "selected": true, "text": "1h", "value": "1h" }, @@ -1501,7 +1539,7 @@ ] }, "time": { - "from": "now-3h", + "from": "now-15m", "to": "now" }, "timepicker": { @@ -1532,5 +1570,6 @@ "timezone": "", "title": "Traefik 2", "uid": "3ipsWfViz", - "version": 4 -} + "version": 26, + "weekStart": "" +} \ No newline at end of file diff --git a/scrape-config.example.yml b/scrape-config.example.yml index 316d837..c16134f 100644 --- a/scrape-config.example.yml +++ b/scrape-config.example.yml @@ -1,4 +1,4 @@ - targets: - - 'traefik.example.org' + - 'example.org:8082/metrics' - 'node.monitoring.example.org' - 'cadvisor.monitoring.example.org'