Grafana dashboard: FitStar Utilization
Description: Utilization of all Fit Star studios

Dashboard for visualizing Fit Star utilization data from an InfluxDB.

# GitHub
The project including the script for pulling the data from the Fit Star website can be found on GitHub: https://github.com/gierens/fitstar-utilization

# Demo
A demo can be found [here](https://grafana-public.schollheim.net/d/qq0XN2SVk/fitstar-utilization)

{
  "__inputs": [
    {
      "name": "DS_INFLUXDB-FITSTAR",
      "label": "InfluxDB-fitstar",
      "description": "InfluxDB with fitstar database fed by our script.",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.2.0"
    },
    {
      "type": "panel",
      "id": "heatmap",
      "name": "Heatmap",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Utilization of all Fit Star studios",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB-FITSTAR}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 20
              },
              {
                "color": "orange",
                "value": 40
              },
              {
                "color": "red",
                "value": 60
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 4,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "9.2.0",
      "targets": [
        {
          "alias": "[[tag_studio]]",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB-FITSTAR}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "studio"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "utilization",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "utilization"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [
            {
              "key": "studio",
              "operator": "=~",
              "value": "/^$studio$/"
            }
          ]
        }
      ],
      "title": "Last Utilization",
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB-FITSTAR}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 5,
            "gradientMode": "opacity",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 2,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right",
          "showLegend": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "alias": "[[tag_studio]]",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB-FITSTAR}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "studio"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "utilization",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"utilization\") FROM \"utilization\" WHERE (\"studio\" = 'muenchen-neuhausen') AND $timeFilter GROUP BY time($__interval) fill(null)",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "utilization"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [
            {
              "key": "studio",
              "operator": "=~",
              "value": "/^$studio$/"
            }
          ]
        }
      ],
      "title": "Utilization History",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB-FITSTAR}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "scaleDistribution": {
              "type": "linear"
            }
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 17
      },
      "id": 6,
      "interval": "300",
      "maxDataPoints": 200,
      "options": {
        "calculate": false,
        "cellGap": 1,
        "cellValues": {
          "unit": "percent"
        },
        "color": {
          "exponent": 0.5,
          "fill": "dark-orange",
          "min": 1,
          "mode": "scheme",
          "reverse": true,
          "scale": "exponential",
          "scheme": "Warm",
          "steps": 128
        },
        "exemplars": {
          "color": "rgba(255,0,255,0.7)"
        },
        "filterValues": {
          "ge": 101,
          "le": -1
        },
        "legend": {
          "show": true
        },
        "rowsFrame": {
          "layout": "auto"
        },
        "tooltip": {
          "show": true,
          "yHistogram": false
        },
        "yAxis": {
          "axisPlacement": "left",
          "reverse": false
        }
      },
      "pluginVersion": "9.2.0",
      "targets": [
        {
          "alias": "[[tag_studio]]",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB-FITSTAR}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "studio"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "utilization",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "utilization"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [
            {
              "key": "studio",
              "operator": "=~",
              "value": "/^$studio$/"
            }
          ]
        }
      ],
      "title": "Utilization History",
      "type": "heatmap"
    }
  ],
  "refresh": false,
  "schemaVersion": 37,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "InfluxDB-fitstar",
          "value": "InfluxDB-fitstar"
        },
        "description": "InfluxDB data source containing the fitstar database",
        "hide": 0,
        "includeAll": false,
        "label": "influxdb",
        "multi": false,
        "name": "influxdb",
        "options": [],
        "query": "influxdb",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {},
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB-FITSTAR}"
        },
        "definition": "SHOW TAG VALUES FROM utilization WITH KEY=studio",
        "description": "Name of the studio, e.g. munich-neuhausen",
        "hide": 0,
        "includeAll": true,
        "label": "studio",
        "multi": true,
        "name": "studio",
        "options": [],
        "query": "SHOW TAG VALUES FROM utilization WITH KEY=studio",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "FitStar Utilization",
  "uid": "qq0XN2SVk",
  "version": 18,
  "weekStart": "",
  "gnetId": 17200
}