Traefik - tferdinand.net
Sharing of my personal dashboard.
Some values are currently hardcoded, you'll need to modify this dashboard to fit your needs ;)


You can know how I deployed this one on my blog :
EN : https://tferdinand.net/en/extraction-of-traefik-accesslogs-and-dashboard-creation/
FR : https://tferdinand.net/extraction-des-accesslogs-traefik-et-creation-de-dashboard/
{
  "__inputs": [
    {
      "name": "DS_ELASTICSEARCH",
      "label": "Elasticsearch",
      "description": "",
      "type": "datasource",
      "pluginId": "elasticsearch",
      "pluginName": "Elasticsearch"
    }
  ],
  "__requires": [
    {
      "type": "datasource",
      "id": "elasticsearch",
      "name": "Elasticsearch",
      "version": "1.0.0"
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.5.2"
    },
    {
      "type": "panel",
      "id": "grafana-worldmap-panel",
      "name": "Worldmap Panel",
      "version": "0.2.1"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 12361,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1590489117169,
  "links": [],
  "panels": [
    {
      "circleMaxSize": "30",
      "circleMinSize": "2",
      "colors": [
        "rgba(245, 54, 54, 0.9)",
        "rgba(237, 129, 40, 0.89)",
        "rgba(50, 172, 45, 0.97)"
      ],
      "datasource": "${DS_ELASTICSEARCH}",
      "decimals": 0,
      "esMetric": "Count",
      "gridPos": {
        "h": 21,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "hideEmpty": true,
      "hideZero": true,
      "id": 11,
      "initialZoom": "5",
      "locationData": "table",
      "mapCenter": "custom",
      "mapCenterLatitude": "48.86666 14 Initial Zoom 77",
      "mapCenterLongitude": "2.333333",
      "maxDataPoints": 1,
      "mouseWheelZoom": true,
      "options": {},
      "showLegend": true,
      "stickyLabels": false,
      "tableQueryOptions": {
        "geohashField": "geohash",
        "labelField": "source.geo.city_name",
        "latitudeField": "source.geo.location.lat",
        "longitudeField": "source.geo.location.lon",
        "metricField": "http.version",
        "queryType": "coordinates"
      },
      "targets": [
        {
          "bucketAggs": [
            {
              "fake": true,
              "field": "@timestamp",
              "id": "3",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "logs"
            }
          ],
          "query": "traefik.access.frontend_name:$backend AND -url.original:\\/robots.txt  -url.original:\\/content\\/*  -url.original:\\/assets\\/* -url.original:\\/public\\/* -url.original:\\/avatar\\/*  -url.original:\\/favicon.ico*  -url.original:\\/ads.txt -url.original:\\/api\\/*  -url.original:\\/ghost\\/*",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": "0,10",
      "timeFrom": null,
      "timeShift": null,
      "title": "Panel Title",
      "type": "grafana-worldmap-panel",
      "unitPlural": "",
      "unitSingle": "",
      "valueName": "total"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorPrefix": false,
      "colorValue": false,
      "colors": [
        "#1F60C4",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_ELASTICSEARCH}",
      "decimals": 0,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 12,
        "y": 0
      },
      "id": 6,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "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,
        "ymax": null,
        "ymin": null
      },
      "tableColumn": "Count",
      "targets": [
        {
          "bucketAggs": [
            {
              "field": "url.original",
              "id": "2",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "count"
            }
          ],
          "query": "traefik.access.frontend_name:$backend AND (url.original:*ref=li* OR url.original:*utm_source=linkedin*)",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "From LinkedIn",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "0",
          "value": "null"
        }
      ],
      "valueName": "total"
    },
    {
      "cacheTimeout": null,
      "columns": [],
      "datasource": "${DS_ELASTICSEARCH}",
      "fontSize": "120%",
      "gridPos": {
        "h": 9,
        "w": 10,
        "x": 14,
        "y": 0
      },
      "id": 4,
      "links": [],
      "options": {},
      "pageSize": null,
      "pluginVersion": "6.5.2",
      "showHeader": true,
      "sort": {
        "col": 1,
        "desc": true
      },
      "styles": [
        {
          "alias": "Time",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "date"
        },
        {
          "alias": "Occurences",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 0,
          "pattern": "Count",
          "thresholds": [],
          "type": "number",
          "unit": "none"
        },
        {
          "alias": "Url",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "url.original",
          "preserveFormat": false,
          "sanitize": false,
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": []
        }
      ],
      "targets": [
        {
          "bucketAggs": [
            {
              "field": "url.original",
              "id": "2",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_count",
                "size": "20"
              },
              "type": "terms"
            }
          ],
          "metrics": [
            {
              "field": "url.original",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "count"
            }
          ],
          "query": "traefik.access.frontend_name:$backend AND -url.original:\\/robots.txt  -url.original:\\/content\\/*  -url.original:\\/assets\\/* -url.original:\\/public\\/* -url.original:\\/avatar\\/*  -url.original:\\/favicon.ico*  -url.original:\\/ads.txt -url.original:\\/api\\/*  -url.original:\\/ghost\\/* AND url.original:$page* AND -url.original:\\/en\\/robots.txt  -url.original:\\/en\\/content\\/*  -url.original:\\/en\\/assets\\/* -url.original:\\/en\\/public\\/* -url.original:\\/en\\/avatar\\/*  -url.original:\\/en\\/favicon.ico*  -url.original:\\/en\\/ads.txt -url.original:\\/en\\/api\\/*  -url.original:\\/en\\/ghost\\/* AND url.original:$page*",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top requests",
      "transform": "table",
      "type": "table"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorPrefix": false,
      "colorValue": false,
      "colors": [
        "#8F3BB8",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_ELASTICSEARCH}",
      "decimals": 0,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 12,
        "y": 3
      },
      "id": 8,
      "interval": "",
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "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,
        "ymax": null,
        "ymin": null
      },
      "tableColumn": "Count",
      "targets": [
        {
          "bucketAggs": [
            {
              "field": "url.original",
              "id": "2",
              "settings": {
                "min_doc_count": 1,
                "missing": null,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "count"
            }
          ],
          "query": "traefik.access.frontend_name:$backend AND (url.original:*ref=tw* OR url.original:*utm_source=twitter*)",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "From Twitter",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "0",
          "value": "null"
        }
      ],
      "valueName": "total"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorPrefix": false,
      "colorValue": false,
      "colors": [
        "#C4162A",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_ELASTICSEARCH}",
      "decimals": 0,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 12,
        "y": 6
      },
      "id": 9,
      "interval": "",
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "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,
        "ymax": null,
        "ymin": null
      },
      "tableColumn": "Count",
      "targets": [
        {
          "bucketAggs": [
            {
              "field": "url.original",
              "id": "2",
              "settings": {
                "min_doc_count": 1,
                "missing": null,
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "count"
            }
          ],
          "query": "traefik.access.frontend_name:$backend AND (url.original:*ref=fb* OR url.original:*utm_source=facebook.page*)",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "From Facebook",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "0",
          "value": "null"
        }
      ],
      "valueName": "total"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_ELASTICSEARCH}",
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 12,
        "w": 12,
        "x": 12,
        "y": 9
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "bucketAggs": [
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "traefik.access.frontend_name:$backend",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Hits on tferdinand.net",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "30s",
  "schemaVersion": 21,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_ELASTICSEARCH}",
        "definition": "{\"find\": \"terms\", \"field\": \"traefik.access.frontend_name\"}",
        "hide": 0,
        "includeAll": false,
        "label": "Backend name",
        "multi": false,
        "name": "backend",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"traefik.access.frontend_name\"}",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": "*",
        "current": {},
        "datasource": "${DS_ELASTICSEARCH}",
        "definition": "{\"find\": \"terms\", \"field\": \"url.original\"}",
        "hide": 0,
        "includeAll": true,
        "label": "Page",
        "multi": false,
        "name": "page",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"url.original\"}",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-30m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Traefik - tferdinand.net",
  "uid": "IPRFeZYZz",
  "version": 25,
  "description": "Sharing of my personal dashboard.\nSome values are currently hardcoded, you'll need to modify this dashboard to fit your needs ;)\n\n\nYou can know how I deployed this one on my blog :\nEN : https://tferdinand.net/en/extraction-of-traefik-accesslogs-and-dashboard-creation/\nFR : https://tferdinand.net/extraction-des-accesslogs-traefik-et-creation-de-dashboard/"
}