Grafana dashboard: Polystat Blog Part 2 - Simple Rollup
Description: Dashboard using polystat panel, as described in blog post.

Metrics collected by cAdvisor in Kubernetes, stored in Prometheus.

{
  "__inputs": [
    {
      "name": "DS_OPS-CORTEX",
      "label": "ops-cortex",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.1.2"
    },
    {
      "type": "panel",
      "id": "grafana-polystat-panel",
      "name": "Polystat",
      "version": "1.0.16"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 10053,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1555425645204,
  "links": [],
  "panels": [
    {
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_OPS-CORTEX}",
      "gridPos": {
        "h": 8,
        "w": 11,
        "x": 0,
        "y": 0
      },
      "id": 4,
      "links": [],
      "polystat": {
        "animationSpeed": 2500,
        "columnAutoSize": true,
        "columns": "",
        "defaultClickThrough": "dashboard/db/cassandra?var-environment=$Cluster",
        "defaultClickThroughSanitize": true,
        "displayLimit": 100,
        "fontAutoScale": true,
        "fontSize": 50,
        "fontType": "Roboto",
        "globalDecimals": 2,
        "globalDisplayMode": "all",
        "globalDisplayTextTriggeredEmpty": "OK",
        "globalOperatorName": "avg",
        "globalUnitFormat": "short",
        "gradientEnabled": true,
        "hexagonSortByDirection": "asc",
        "hexagonSortByField": "name",
        "maxMetrics": 0,
        "polygonBorderColor": "black",
        "polygonBorderSize": 2,
        "polygonGlobalFillColor": "#0a50a1",
        "radius": "",
        "radiusAutoSize": true,
        "rowAutoSize": true,
        "rows": "",
        "shape": "hexagon_pointed_top",
        "tooltipDisplayMode": "all",
        "tooltipDisplayTextTriggeredEmpty": "OK",
        "tooltipFontSize": 12,
        "tooltipFontType": "Roboto",
        "tooltipPrimarySortDirection": "desc",
        "tooltipPrimarySortField": "thresholdLevel",
        "tooltipSecondarySortDirection": "desc",
        "tooltipSecondarySortField": "value",
        "tooltipTimestampEnabled": true
      },
      "savedComposites": [
        {
          "animateMode": "all",
          "clickThrough": "dashboard/db/polystat-part-2-drilldown1?var-namespace=metrictank&var-Cluster=${Cluster}",
          "compositeName": "QA",
          "enabled": true,
          "hideMembers": true,
          "label": "COMPOSITE 1",
          "members": [
            {
              "seriesName": "qa-us-central1 cassandra-sfs-.*"
            }
          ],
          "sanitizeURLEnabled": true,
          "sanitizedURL": "",
          "showName": true,
          "showValue": true,
          "thresholdLevel": 0
        },
        {
          "animateMode": "all",
          "clickThrough": "dashboard/db/polystat-part-2-drilldown1?var-namespace=metrictank&var-Cluster=${Cluster}",
          "compositeName": "OPS",
          "enabled": true,
          "hideMembers": true,
          "label": "COMPOSITE 2",
          "members": [
            {
              "seriesName": "ops-tools1 cassandra-sfs-.*"
            }
          ],
          "sanitizeURLEnabled": true,
          "sanitizedURL": "",
          "showName": true,
          "showValue": true,
          "thresholdLevel": 0
        }
      ],
      "savedOverrides": [
        {
          "clickThrough": "",
          "colors": [
            "#299c46",
            "#e5ac0e",
            "#bf1b00",
            "#ffffff"
          ],
          "decimals": 2,
          "enabled": true,
          "label": "OVERRIDE 1",
          "metricName": ".*CPU",
          "operatorName": "avg",
          "prefix": "",
          "sanitizeURLEnabled": true,
          "scaledDecimals": null,
          "suffix": "",
          "thresholds": [
            {
              "color": "#299c46",
              "state": 0,
              "value": 0
            },
            {
              "color": "#e5ac0e",
              "state": 1,
              "value": 3.7
            },
            {
              "color": "#bf1b00",
              "state": 2,
              "value": 80
            }
          ],
          "unitFormat": "percent"
        },
        {
          "clickThrough": "",
          "colors": [
            "#299c46",
            "#e5ac0e",
            "#bf1b00",
            "#ffffff"
          ],
          "decimals": 2,
          "enabled": true,
          "label": "OVERRIDE 2",
          "metricName": ".*Disk.*",
          "operatorName": "avg",
          "prefix": "",
          "sanitizeURLEnabled": true,
          "scaledDecimals": null,
          "suffix": "",
          "thresholds": [
            {
              "color": "#bf1b00",
              "state": 2,
              "value": 0
            },
            {
              "color": "#e5ac0e",
              "state": 1,
              "value": 50
            },
            {
              "color": "#299c46",
              "state": 0,
              "value": 100
            }
          ],
          "unitFormat": "bytes"
        },
        {
          "clickThrough": "",
          "colors": [
            "#299c46",
            "#e5ac0e",
            "#bf1b00",
            "#ffffff"
          ],
          "decimals": 2,
          "enabled": true,
          "label": "OVERRIDE 3",
          "metricName": ".*Memory.*",
          "operatorName": "avg",
          "prefix": "",
          "sanitizeURLEnabled": true,
          "scaledDecimals": null,
          "suffix": "",
          "thresholds": [
            {
              "color": "#299c46",
              "state": 0,
              "value": 0
            },
            {
              "color": "#e5ac0e",
              "state": 1,
              "value": 12
            },
            {
              "color": "#bf1b00",
              "state": 2,
              "value": 2000000000000
            }
          ],
          "unitFormat": "decbytes"
        }
      ],
      "targets": [
        {
          "expr": "irate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod_name=~\"cassandra-sfs-.*\", container_name=\"cassandra\", cluster=~\"$Cluster\"}[1m])\n",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "{{cluster}} {{pod_name}} CPU",
          "refId": "A"
        },
        {
          "expr": "container_fs_usage_bytes{namespace=\"$namespace\", pod_name=~\"cassandra-sfs-.*\", container_name=\"cassandra\", cluster=~\"$Cluster\"}",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "{{cluster}} {{pod_name}} Disk Usage",
          "refId": "C"
        },
        {
          "expr": "container_memory_usage_bytes{namespace=\"$namespace\", pod_name=~\"cassandra-sfs-.*\", container_name=\"cassandra\", cluster=~\"$Cluster\"}",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "{{cluster}} {{pod_name}} Memory Usage",
          "refId": "D"
        },
        {
          "expr": "container_spec_memory_limit_bytes{namespace=\"$namespace\", pod_name=~\"cassandra-sfs-.*\", container_name=\"$namespace\", cluster=~\"$Cluster\"} - container_memory_usage_bytes{namespace=\"metrictank\", pod_name=~\"cassandra-sfs-.*\", container_name=\"cassandra\", cluster=~\"$Cluster\"}",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "{{cluster}} {{pod_name}} Memory Free",
          "refId": "E"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Cassandra Clusters",
      "type": "grafana-polystat-panel"
    }
  ],
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_OPS-CORTEX}",
        "definition": "label_values(kube_pod_container_info{namespace=~\"metrictank\"}, cluster)",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": true,
        "name": "Cluster",
        "options": [],
        "query": "label_values(kube_pod_container_info{namespace=~\"metrictank\"}, cluster)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 5,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_OPS-CORTEX}",
        "definition": "label_values(kube_pod_container_info{image=~\".*cassandra.*\"}, namespace)",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "namespace",
        "options": [],
        "query": "label_values(kube_pod_container_info{image=~\".*cassandra.*\"}, namespace)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 5,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Polystat Blog Part 2 - Simple Rollup",
  "uid": "JieL3fgZk",
  "version": 16,
  "description": "Dashboard using polystat panel, as described in blog post."
}