Grafana update + renderer + new dashboards

This commit is contained in:
IamTheFij 2022-11-15 08:59:06 -08:00
parent bee9b641cc
commit 954a878915
8 changed files with 3789 additions and 2115 deletions

View File

@ -4,8 +4,6 @@ job "grafana" {
group "grafana" { group "grafana" {
count = 1 count = 1
# TODO: Add backup task or job
network { network {
mode = "bridge" mode = "bridge"
@ -13,6 +11,11 @@ job "grafana" {
host_network = "loopback" host_network = "loopback"
to = 3000 to = 3000
} }
port "renderer" {
host_network = "loopback"
to = 8081
}
} }
ephemeral_disk { ephemeral_disk {
@ -132,7 +135,7 @@ SELECT 'NOOP';
driver = "docker" driver = "docker"
config { config {
image = "grafana/grafana:7.3.6" image = "grafana/grafana:9.2.4"
ports = ["web"] ports = ["web"]
mount { mount {
@ -189,6 +192,9 @@ ${file(join("/", [module_path, "grafana", config_file]))}
change_mode = "signal" change_mode = "signal"
change_signal = "SIGHUP" change_signal = "SIGHUP"
destination = "local/config/${config_file}" destination = "local/config/${config_file}"
perms = 777
# Set owner to grafana uid
# uid = 472
# Change template delimeter for dashboard files that use json and have double curly braces and square braces # Change template delimeter for dashboard files that use json and have double curly braces and square braces
%{ if length(regexall("dashboard", config_file)) > 0 ~} %{ if length(regexall("dashboard", config_file)) > 0 ~}
left_delimiter = "<<<<" left_delimiter = "<<<<"
@ -202,5 +208,21 @@ ${file(join("/", [module_path, "grafana", config_file]))}
memory = 200 memory = 200
} }
} }
task "grafana-image-renderer" {
driver = "docker"
config {
image = "grafana/grafana-image-renderer:3.6.1"
ports = ["renderer"]
}
env = {
"RENDERING_MODE" = "clustered"
"RENDERING_CLUSTERING_MODE" = "browser"
"RENDERING_CLUSTERING_MAX_CONCURRENCY" = 5
"RENDERING_CLUSTERING_TIMEOUT" = 30
}
}
} }
} }

View File

@ -436,30 +436,10 @@ endpoint = https://minio.thefij.rocks
bucket = grafana-images bucket = grafana-images
region = us-east-1 region = us-east-1
path_style_access = true path_style_access = true
;path =
;access_key =
;secret_key =
[external_image_storage.webdav]
;url =
;public_url =
;username =
;password =
[external_image_storage.gcs]
;key_file =
;bucket =
;path =
[external_image_storage.azure_blob]
;account_name =
;account_key =
;container_name =
[external_image_storage.local] [external_image_storage.local]
# does not require any configuration # does not require any configuration
[rendering] [rendering]
server_url = http://renderer:8081/render server_url = http://{{ env "NOMAD_ADDR_renderer" }}/render
callback_url = http://grafana:3000/ callback_url = http://{{ env "NOMAD_ADDR_web" }}/
concurrent_render_request_limit = 3

View File

@ -16,8 +16,8 @@
"editable": true, "editable": true,
"gnetId": 6278, "gnetId": 6278,
"graphTooltip": 1, "graphTooltip": 1,
"id": 8, "id": 7,
"iteration": 1659118948293, "iteration": 1668453493963,
"links": [], "links": [],
"panels": [ "panels": [
{ {
@ -117,7 +117,7 @@
} }
], ],
"thresholds": "", "thresholds": "",
"title": "CPU", "title": "CPU ($host)",
"type": "singlestat", "type": "singlestat",
"valueFontSize": "80%", "valueFontSize": "80%",
"valueMaps": [ "valueMaps": [
@ -214,7 +214,7 @@
} }
], ],
"thresholds": "", "thresholds": "",
"title": "Memory", "title": "Memory ($host)",
"type": "singlestat", "type": "singlestat",
"valueFontSize": "80%", "valueFontSize": "80%",
"valueMaps": [ "valueMaps": [
@ -312,7 +312,7 @@
} }
], ],
"thresholds": "", "thresholds": "",
"title": "Disk", "title": "Disk ($host)",
"type": "singlestat", "type": "singlestat",
"valueFontSize": "80%", "valueFontSize": "80%",
"valueMaps": [ "valueMaps": [
@ -418,10 +418,50 @@
], ],
"textSize": 14, "textSize": 14,
"textSizeTime": 12, "textSizeTime": 12,
"timeOptions": [
{
"name": "Years",
"value": "years"
},
{
"name": "Months",
"value": "months"
},
{
"name": "Weeks",
"value": "weeks"
},
{
"name": "Days",
"value": "days"
},
{
"name": "Hours",
"value": "hours"
},
{
"name": "Minutes",
"value": "minutes"
},
{
"name": "Seconds",
"value": "seconds"
},
{
"name": "Milliseconds",
"value": "milliseconds"
}
],
"timePrecision": {
"name": "Minutes",
"value": "minutes"
},
"timeTextColor": "#d8d9da", "timeTextColor": "#d8d9da",
"title": "Summary", "title": "Summary ($host)",
"type": "natel-discrete-panel", "type": "natel-discrete-panel",
"units": "short", "units": "short",
"use12HourClock": false,
"useTimePrecision": false,
"valueMaps": [ "valueMaps": [
{ {
"op": "=", "op": "=",
@ -532,7 +572,7 @@
} }
], ],
"thresholds": "", "thresholds": "",
"title": "Uptime($host)", "title": "Uptime ($host)",
"type": "singlestat", "type": "singlestat",
"valueFontSize": "50%", "valueFontSize": "50%",
"valueMaps": [ "valueMaps": [
@ -620,7 +660,7 @@
"tableColumn": "", "tableColumn": "",
"targets": [ "targets": [
{ {
"expr": "nomad_client_host_cpu_idle{datacenter=\"$datacenter\", host=\"$host\"}", "expr": "avg(nomad_client_host_cpu_idle{datacenter=\"$datacenter\", host=\"$host\"})",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
@ -629,7 +669,7 @@
} }
], ],
"thresholds": "20,80", "thresholds": "20,80",
"title": "CPU Idle($host)", "title": "CPU Idle ($host)",
"type": "singlestat", "type": "singlestat",
"valueFontSize": "80%", "valueFontSize": "80%",
"valueMaps": [ "valueMaps": [
@ -1039,7 +1079,6 @@
"allValue": null, "allValue": null,
"current": { "current": {
"selected": true, "selected": true,
"tags": [],
"text": [ "text": [
"n2" "n2"
], ],
@ -1100,6 +1139,6 @@
}, },
"timezone": "", "timezone": "",
"title": "Nomad Cluster", "title": "Nomad Cluster",
"uid": "CiP3mZVik", "uid": "lDPoGyv4z",
"version": 5 "version": 4
} }

View File

@ -1,732 +0,0 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "panel",
"id": "singlestat",
"name": "Singlestat",
"version": ""
},
{
"type": "panel",
"id": "text",
"name": "Text",
"version": ""
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "3.1.0"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"id": null,
"title": "Prometheus Stats",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": true,
"sharedCrosshair": false,
"rows": [
{
"collapse": false,
"editable": true,
"height": 178,
"panels": [
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"datasource": "$${DS_PROMETHEUS}",
"decimals": 1,
"editable": true,
"error": false,
"format": "s",
"id": 5,
"interval": null,
"links": [],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"span": 3,
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
},
"targets": [
{
"expr": "(time() - process_start_time_seconds{job=\"prometheus\"})",
"intervalFactor": 2,
"refId": "A",
"step": 4
}
],
"thresholds": "",
"title": "Uptime",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current",
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"rangeMaps": [
{
"from": "null",
"to": "null",
"text": "N/A"
}
],
"mappingType": 1,
"gauge": {
"show": false,
"minValue": 0,
"maxValue": 100,
"thresholdMarkers": true,
"thresholdLabels": false
}
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "$${DS_PROMETHEUS}",
"editable": true,
"error": false,
"format": "none",
"id": 6,
"interval": null,
"links": [],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"span": 3,
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"targets": [
{
"expr": "prometheus_local_storage_memory_series",
"intervalFactor": 2,
"refId": "A",
"step": 4
}
],
"thresholds": "1,5",
"title": "Local Storage Memory Series",
"type": "singlestat",
"valueFontSize": "70%",
"valueMaps": [],
"valueName": "current",
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"rangeMaps": [
{
"from": "null",
"to": "null",
"text": "N/A"
}
],
"mappingType": 1,
"gauge": {
"show": false,
"minValue": 0,
"maxValue": 100,
"thresholdMarkers": true,
"thresholdLabels": false
}
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": true,
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "$${DS_PROMETHEUS}",
"editable": true,
"error": false,
"format": "none",
"id": 7,
"interval": null,
"links": [],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"span": 3,
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"targets": [
{
"expr": "prometheus_local_storage_indexing_queue_length",
"intervalFactor": 2,
"refId": "A",
"step": 4
}
],
"thresholds": "500,4000",
"title": "Interal Storage Queue Length",
"type": "singlestat",
"valueFontSize": "70%",
"valueMaps": [
{
"op": "=",
"text": "Empty",
"value": "0"
}
],
"valueName": "current",
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"rangeMaps": [
{
"from": "null",
"to": "null",
"text": "N/A"
}
],
"mappingType": 1,
"gauge": {
"show": false,
"minValue": 0,
"maxValue": 100,
"thresholdMarkers": true,
"thresholdLabels": false
}
},
{
"content": "<img src=\"http://prometheus.io/assets/prometheus_logo_grey.svg\" alt=\"Prometheus logo\" style=\"height: 40px;\">\n<span style=\"font-family: 'Open Sans', 'Helvetica Neue', Helvetica; font-size: 25px;vertical-align: text-top;color: #bbbfc2;margin-left: 10px;\">Prometheus</span>\n\n<p style=\"margin-top: 10px;\">You're using Prometheus, an open-source systems monitoring and alerting toolkit originally built at SoundCloud. For more information, check out the <a href=\"http://www.grafana.org/\">Grafana</a> and <a href=\"http://prometheus.io/\">Prometheus</a> projects.</p>",
"editable": true,
"error": false,
"id": 9,
"links": [],
"mode": "html",
"span": 3,
"style": {},
"title": "",
"transparent": true,
"type": "text"
}
],
"title": "New row"
},
{
"collapse": false,
"editable": true,
"height": 227,
"panels": [
{
"aliasColors": {
"prometheus": "#C15C17",
"{instance=\"localhost:9090\",job=\"prometheus\"}": "#C15C17"
},
"bars": false,
"datasource": "$${DS_PROMETHEUS}",
"editable": true,
"error": false,
"fill": 1,
"grid": {
"threshold1": null,
"threshold1Color": "rgba(216, 200, 27, 0.27)",
"threshold2": null,
"threshold2Color": "rgba(234, 112, 112, 0.22)"
},
"id": 3,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 9,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rate(prometheus_local_storage_ingested_samples_total[5m])",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{job}}",
"metric": "",
"refId": "A",
"step": 2
}
],
"timeFrom": null,
"timeShift": null,
"title": "Samples ingested (rate-5m)",
"tooltip": {
"shared": true,
"value_type": "cumulative",
"ordering": "alphabetical",
"msResolution": false
},
"type": "graph",
"yaxes": [
{
"show": true,
"min": null,
"max": null,
"logBase": 1,
"format": "short"
},
{
"show": true,
"min": null,
"max": null,
"logBase": 1,
"format": "short"
}
],
"xaxis": {
"show": true
}
},
{
"content": "#### Samples Ingested\nThis graph displays the count of samples ingested by the Prometheus server, as measured over the last 5 minutes, per time series in the range vector. When troubleshooting an issue on IRC or Github, this is often the first stat requested by the Prometheus team. ",
"editable": true,
"error": false,
"id": 8,
"links": [],
"mode": "markdown",
"span": 2.995914043583536,
"style": {},
"title": "",
"transparent": true,
"type": "text"
}
],
"title": "New row"
},
{
"collapse": false,
"editable": true,
"height": "250px",
"panels": [
{
"aliasColors": {
"prometheus": "#F9BA8F",
"{instance=\"localhost:9090\",interval=\"5s\",job=\"prometheus\"}": "#F9BA8F"
},
"bars": false,
"datasource": "$${DS_PROMETHEUS}",
"editable": true,
"error": false,
"fill": 1,
"grid": {
"threshold1": null,
"threshold1Color": "rgba(216, 200, 27, 0.27)",
"threshold2": null,
"threshold2Color": "rgba(234, 112, 112, 0.22)"
},
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 5,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rate(prometheus_target_interval_length_seconds_count[5m])",
"intervalFactor": 2,
"legendFormat": "{{job}}",
"refId": "A",
"step": 2
}
],
"timeFrom": null,
"timeShift": null,
"title": "Target Scrapes (last 5m)",
"tooltip": {
"shared": true,
"value_type": "cumulative",
"ordering": "alphabetical",
"msResolution": false
},
"type": "graph",
"yaxes": [
{
"show": true,
"min": null,
"max": null,
"logBase": 1,
"format": "short"
},
{
"show": true,
"min": null,
"max": null,
"logBase": 1,
"format": "short"
}
],
"xaxis": {
"show": true
}
},
{
"aliasColors": {},
"bars": false,
"datasource": "$${DS_PROMETHEUS}",
"editable": true,
"error": false,
"fill": 1,
"grid": {
"threshold1": null,
"threshold1Color": "rgba(216, 200, 27, 0.27)",
"threshold2": null,
"threshold2Color": "rgba(234, 112, 112, 0.22)"
},
"id": 14,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 4,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "prometheus_target_interval_length_seconds{quantile!=\"0.01\", quantile!=\"0.05\"}",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{quantile}} ({{interval}})",
"metric": "",
"refId": "A",
"step": 2
}
],
"timeFrom": null,
"timeShift": null,
"title": "Scrape Duration",
"tooltip": {
"shared": true,
"value_type": "cumulative",
"ordering": "alphabetical",
"msResolution": false
},
"type": "graph",
"yaxes": [
{
"show": true,
"min": null,
"max": null,
"logBase": 1,
"format": "short"
},
{
"show": true,
"min": null,
"max": null,
"logBase": 1,
"format": "short"
}
],
"xaxis": {
"show": true
}
},
{
"content": "#### Scrapes\nPrometheus scrapes metrics from instrumented jobs, either directly or via an intermediary push gateway for short-lived jobs. Target scrapes will show how frequently targets are scraped, as measured over the last 5 minutes, per time series in the range vector. Scrape Duration will show how long the scrapes are taking, with percentiles available as series. ",
"editable": true,
"error": false,
"id": 11,
"links": [],
"mode": "markdown",
"span": 3,
"style": {},
"title": "",
"transparent": true,
"type": "text"
}
],
"title": "New row"
},
{
"collapse": false,
"editable": true,
"height": "250px",
"panels": [
{
"aliasColors": {},
"bars": false,
"datasource": "$${DS_PROMETHEUS}",
"decimals": null,
"editable": true,
"error": false,
"fill": 1,
"grid": {
"threshold1": null,
"threshold1Color": "rgba(216, 200, 27, 0.27)",
"threshold2": null,
"threshold2Color": "rgba(234, 112, 112, 0.22)"
},
"id": 12,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"hideEmpty": true,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 9,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "prometheus_evaluator_duration_milliseconds{quantile!=\"0.01\", quantile!=\"0.05\"}",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{quantile}}",
"refId": "A",
"step": 2
}
],
"timeFrom": null,
"timeShift": null,
"title": "Rule Eval Duration",
"tooltip": {
"shared": true,
"value_type": "cumulative",
"ordering": "alphabetical",
"msResolution": false
},
"type": "graph",
"yaxes": [
{
"show": true,
"min": null,
"max": null,
"logBase": 1,
"format": "percentunit",
"label": ""
},
{
"show": true,
"min": null,
"max": null,
"logBase": 1,
"format": "short"
}
],
"xaxis": {
"show": true
}
},
{
"content": "#### Rule Evaluation Duration\nThis graph panel plots the duration for all evaluations to execute. The 50th percentile, 90th percentile and 99th percentile are shown as three separate series to help identify outliers that may be skewing the data.",
"editable": true,
"error": false,
"id": 15,
"links": [],
"mode": "markdown",
"span": 3,
"style": {},
"title": "",
"transparent": true,
"type": "text"
}
],
"title": "New row"
}
],
"time": {
"from": "now-5m",
"to": "now"
},
"timepicker": {
"now": true,
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"templating": {
"list": []
},
"annotations": {
"list": []
},
"refresh": false,
"schemaVersion": 12,
"version": 0,
"links": [
{
"icon": "info",
"tags": [],
"targetBlank": true,
"title": "Grafana Docs",
"tooltip": "",
"type": "link",
"url": "http://www.grafana.org/docs"
},
{
"icon": "info",
"tags": [],
"targetBlank": true,
"title": "Prometheus Docs",
"type": "link",
"url": "http://prometheus.io/docs/introduction/overview/"
}
],
"gnetId": 2,
"description": "The official, pre-built Prometheus Stats Dashboard."
}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,46 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.5.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "panel",
"id": "piechart",
"name": "Pie chart v2",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "singlestat",
"name": "Singlestat",
"version": ""
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -16,11 +58,12 @@
"editable": true, "editable": true,
"gnetId": 4475, "gnetId": 4475,
"graphTooltip": 0, "graphTooltip": 0,
"id": 8, "id": null,
"iteration": 1540859046582, "iteration": 1620932097756,
"links": [], "links": [],
"panels": [ "panels": [
{ {
"datasource": null,
"gridPos": { "gridPos": {
"h": 1, "h": 1,
"w": 24, "w": 24,
@ -33,126 +76,75 @@
}, },
{ {
"cacheTimeout": null, "cacheTimeout": null,
"colorBackground": false, "datasource": "${DS_PROMETHEUS}",
"colorValue": true, "fieldConfig": {
"colors": [ "defaults": {
"#d44a3a", "color": {
"rgba(237, 129, 40, 0.89)", "mode": "palette-classic"
"#299c46" },
], "decimals": 0,
"datasource": "Prometheus", "mappings": [],
"format": "none", "thresholds": {
"gauge": { "mode": "absolute",
"maxValue": 100, "steps": [
"minValue": 0, {
"show": false, "color": "green",
"thresholdLabels": false, "value": null
"thresholdMarkers": true },
}, {
"gridPos": { "color": "red",
"h": 7, "value": 80
"w": 8, }
"x": 0, ]
"y": 1 },
}, "unit": "short"
"id": 1,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
}, },
{ "overrides": []
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
}, },
"tableColumn": "",
"targets": [
{
"expr": "sum(traefik_backend_server_up{backend=~\"$${backend:regex}\"})/count(traefik_config_reloads_total)",
"format": "time_series",
"intervalFactor": 2,
"refId": "A"
}
],
"thresholds": "0,1",
"title": "$backend status",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "OK",
"value": "1"
}
],
"valueName": "current"
},
{
"aliasColors": {},
"breakPoint": "50%",
"cacheTimeout": null,
"combine": {
"label": "Others",
"threshold": 0
},
"datasource": "Prometheus",
"fontSize": "80%",
"format": "short",
"gridPos": { "gridPos": {
"h": 7, "h": 7,
"w": 8, "w": 12,
"x": 8, "x": 0,
"y": 1 "y": 1
}, },
"id": 2, "id": 2,
"interval": null, "interval": null,
"legend": {
"percentage": true,
"show": true,
"values": true
},
"legendType": "Right side",
"links": [], "links": [],
"maxDataPoints": 3, "maxDataPoints": 3,
"nullPointMode": "connected", "options": {
"pieType": "pie", "displayLabels": [],
"strokeWidth": 1, "legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"values": [
"value",
"percent"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {}
},
"targets": [ "targets": [
{ {
"expr": "traefik_backend_requests_total{backend=~\"$${backend:regex}\"}", "exemplar": true,
"expr": "traefik_service_requests_total{service=\"$service\"}",
"format": "time_series", "format": "time_series",
"interval": "",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "{{method}} : {{code}}", "legendFormat": "{{method}} : {{code}}",
"refId": "A" "refId": "A"
} }
], ],
"title": "$backend return code", "title": "$service return code",
"type": "grafana-piechart-panel", "type": "piechart"
"valueName": "current"
}, },
{ {
"cacheTimeout": null, "cacheTimeout": null,
@ -163,7 +155,11 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#d44a3a" "#d44a3a"
], ],
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"format": "ms", "format": "ms",
"gauge": { "gauge": {
"maxValue": 100, "maxValue": 100,
@ -174,8 +170,8 @@
}, },
"gridPos": { "gridPos": {
"h": 7, "h": 7,
"w": 8, "w": 12,
"x": 16, "x": 12,
"y": 1 "y": 1
}, },
"id": 4, "id": 4,
@ -215,14 +211,17 @@
"tableColumn": "", "tableColumn": "",
"targets": [ "targets": [
{ {
"expr": "sum(traefik_backend_request_duration_seconds_sum{backend=~\"$${backend:regex}\"}) / sum(traefik_backend_requests_total{backend=~\"$${backend:regex}\"}) * 1000", "exemplar": true,
"expr": "sum(traefik_service_request_duration_seconds_sum{service=\"$service\"}) / sum(traefik_service_requests_total{service=\"$service\"}) * 1000",
"format": "time_series", "format": "time_series",
"interval": "",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "",
"refId": "A" "refId": "A"
} }
], ],
"thresholds": "", "thresholds": "",
"title": "$backend response time", "title": "$service response time",
"type": "singlestat", "type": "singlestat",
"valueFontSize": "80%", "valueFontSize": "80%",
"valueMaps": [ "valueMaps": [
@ -239,14 +238,20 @@
"bars": true, "bars": true,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1, "fill": 1,
"fillGradient": 0,
"gridPos": { "gridPos": {
"h": 7, "h": 7,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 8 "y": 8
}, },
"hiddenSeries": false,
"id": 3, "id": 3,
"legend": { "legend": {
"alignAsTable": true, "alignAsTable": true,
@ -254,7 +259,7 @@
"current": false, "current": false,
"max": true, "max": true,
"min": true, "min": true,
"rightSide": false, "rightSide": true,
"show": true, "show": true,
"total": false, "total": false,
"values": true "values": true
@ -263,7 +268,11 @@
"linewidth": 1, "linewidth": 1,
"links": [], "links": [],
"nullPointMode": "null", "nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false, "percentage": false,
"pluginVersion": "7.5.5",
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -273,17 +282,20 @@
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": "sum(rate(traefik_backend_requests_total{backend=~\"$${backend:regex}\"}[5m]))", "exemplar": true,
"expr": "sum(rate(traefik_service_requests_total{service=\"$service\"}[5m]))",
"format": "time_series", "format": "time_series",
"interval": "",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "Total requests $backend", "legendFormat": "Total requests $service",
"refId": "A" "refId": "A"
} }
], ],
"thresholds": [], "thresholds": [],
"timeFrom": null, "timeFrom": null,
"timeRegions": [],
"timeShift": null, "timeShift": null,
"title": "Total requests over 5min $backend", "title": "Total requests over 5min $service",
"tooltip": { "tooltip": {
"shared": true, "shared": true,
"sort": 0, "sort": 0,
@ -322,6 +334,7 @@
}, },
{ {
"collapsed": false, "collapsed": false,
"datasource": null,
"gridPos": { "gridPos": {
"h": 1, "h": 1,
"w": 24, "w": 24,
@ -338,14 +351,20 @@
"bars": true, "bars": true,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1, "fill": 1,
"fillGradient": 0,
"gridPos": { "gridPos": {
"h": 7, "h": 7,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 16 "y": 16
}, },
"hiddenSeries": false,
"id": 5, "id": 5,
"legend": { "legend": {
"alignAsTable": true, "alignAsTable": true,
@ -362,7 +381,11 @@
"linewidth": 1, "linewidth": 1,
"links": [], "links": [],
"nullPointMode": "null", "nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false, "percentage": false,
"pluginVersion": "7.5.5",
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -381,6 +404,7 @@
], ],
"thresholds": [], "thresholds": [],
"timeFrom": null, "timeFrom": null,
"timeRegions": [],
"timeShift": null, "timeShift": null,
"title": "Status code 200 over 5min", "title": "Status code 200 over 5min",
"tooltip": { "tooltip": {
@ -424,14 +448,20 @@
"bars": true, "bars": true,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1, "fill": 1,
"fillGradient": 0,
"gridPos": { "gridPos": {
"h": 7, "h": 7,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 16 "y": 16
}, },
"hiddenSeries": false,
"id": 6, "id": 6,
"legend": { "legend": {
"alignAsTable": true, "alignAsTable": true,
@ -448,7 +478,11 @@
"linewidth": 1, "linewidth": 1,
"links": [], "links": [],
"nullPointMode": "null", "nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false, "percentage": false,
"pluginVersion": "7.5.5",
"pointradius": 5, "pointradius": 5,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
@ -467,6 +501,7 @@
], ],
"thresholds": [], "thresholds": [],
"timeFrom": null, "timeFrom": null,
"timeRegions": [],
"timeShift": null, "timeShift": null,
"title": "Others status code over 5min", "title": "Others status code over 5min",
"tooltip": { "tooltip": {
@ -506,16 +541,32 @@
} }
}, },
{ {
"aliasColors": {},
"breakPoint": "50%",
"cacheTimeout": null, "cacheTimeout": null,
"combine": { "datasource": "${DS_PROMETHEUS}",
"label": "Others", "fieldConfig": {
"threshold": 0 "defaults": {
"color": {
"mode": "palette-classic"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
}, },
"datasource": "Prometheus",
"fontSize": "80%",
"format": "short",
"gridPos": { "gridPos": {
"h": 7, "h": 7,
"w": 12, "w": 12,
@ -524,41 +575,69 @@
}, },
"id": 7, "id": 7,
"interval": null, "interval": null,
"legend": {
"show": true,
"values": true
},
"legendType": "Right side",
"links": [], "links": [],
"maxDataPoints": 3, "maxDataPoints": 3,
"nullPointMode": "connected", "options": {
"pieType": "pie", "displayLabels": [],
"strokeWidth": 1, "legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"values": [
"value"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"text": {}
},
"targets": [ "targets": [
{ {
"expr": "sum(rate(traefik_backend_requests_total[5m])) by (backend) ", "exemplar": true,
"expr": "sum(rate(traefik_service_requests_total[5m])) by (service) ",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
"intervalFactor": 2, "intervalFactor": 2,
"legendFormat": "{{ backend }}", "legendFormat": "{{ service }}",
"refId": "A" "refId": "A"
} }
], ],
"title": "Requests by service", "title": "Requests by service",
"type": "grafana-piechart-panel", "type": "piechart"
"valueName": "total"
}, },
{ {
"aliasColors": {},
"breakPoint": "50%",
"cacheTimeout": null, "cacheTimeout": null,
"combine": { "datasource": "${DS_PROMETHEUS}",
"label": "Others", "fieldConfig": {
"threshold": 0 "defaults": {
"color": {
"mode": "palette-classic"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
}, },
"datasource": "Prometheus",
"fontSize": "80%",
"format": "short",
"gridPos": { "gridPos": {
"h": 7, "h": 7,
"w": 12, "w": 12,
@ -567,18 +646,31 @@
}, },
"id": 8, "id": 8,
"interval": null, "interval": null,
"legend": {
"show": true,
"values": true
},
"legendType": "Right side",
"links": [], "links": [],
"maxDataPoints": 3, "maxDataPoints": 3,
"nullPointMode": "connected", "options": {
"pieType": "pie", "displayLabels": [],
"strokeWidth": 1, "legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"values": [
"value"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"text": {}
},
"targets": [ "targets": [
{ {
"exemplar": true,
"expr": "sum(rate(traefik_entrypoint_requests_total{entrypoint =~ \"$entrypoint\"}[5m])) by (entrypoint) ", "expr": "sum(rate(traefik_entrypoint_requests_total{entrypoint =~ \"$entrypoint\"}[5m])) by (entrypoint) ",
"format": "time_series", "format": "time_series",
"interval": "", "interval": "",
@ -588,11 +680,10 @@
} }
], ],
"title": "Requests by protocol", "title": "Requests by protocol",
"type": "grafana-piechart-panel", "type": "piechart"
"valueName": "total"
} }
], ],
"schemaVersion": 16, "schemaVersion": 27,
"style": "dark", "style": "dark",
"tags": [ "tags": [
"traefik", "traefik",
@ -601,16 +692,22 @@
"templating": { "templating": {
"list": [ "list": [
{ {
"allValue": "", "allValue": null,
"current": {}, "current": {},
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(service)",
"description": null,
"error": null,
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": false,
"label": null, "label": null,
"multi": false, "multi": false,
"name": "backend", "name": "service",
"options": [], "options": [],
"query": "label_values(traefik_backend_server_up, backend)", "query": {
"query": "label_values(service)",
"refId": "StandardVariableQuery"
},
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,
@ -624,14 +721,20 @@
{ {
"allValue": null, "allValue": null,
"current": {}, "current": {},
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "",
"description": null,
"error": null,
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
"label": null, "label": null,
"multi": true, "multi": true,
"name": "entrypoint", "name": "entrypoint",
"options": [], "options": [],
"query": "label_values(traefik_entrypoint_requests_total, entrypoint)", "query": {
"query": "label_values(entrypoint)",
"refId": "Prometheus-entrypoint-Variable-Query"
},
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,
@ -676,5 +779,5 @@
"timezone": "", "timezone": "",
"title": "Traefik", "title": "Traefik",
"uid": "qPdAviJmz", "uid": "qPdAviJmz",
"version": 5 "version": 10
} }

View File

@ -3,5 +3,6 @@ providers:
- name: default - name: default
folder: 'Provisioned' folder: 'Provisioned'
type: file type: file
disableDeletion: false
options: options:
path: /etc/grafana/provisioning/dashboards/default path: /etc/grafana/provisioning/dashboards/default