{
  "id": "c2b6d9d2-ce48-4a0d-a04f-8547ef366bc5",
  "meta": {
    "name": "Consul",
    "measurements": ["consul_health_checks"],
    "version": "1.0",
    "dashboardVersion": "1.x",
    "description": "Dashboard for the telegraf input plug-in: Consul",
    "author": "influxdata",
    "license": "MIT",
    "icon": "",
    "url": "https://github.com/influxdata/telegraf/tree/master/plugins/inputs/consul"
  },
  "data": {
    "cells": [
      {
        "w": 4,
        "h": 4,
        "name": "Consul – Number of Critical Health Checks",
        "queries": [
          {
            "query": "SELECT count(\"check_id\") as \"Number Critical\" FROM \":db:\".\":rp:\".\"consul_health_checks\" WHERE time > :dashboardTime: AND \"host\" = :host: AND \"status\" = 'critical' GROUP BY time(:interval:), \"service_name\"",
            "wheres": ["\"status\" = 'critical'"],
            "groupbys": ["\"service_name\""],
            "label": "count"
          }
        ],
        "type": "line",
        "axes": {
          "x": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y": {
            "prefix": "",
            "suffix": "count",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y2": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          }
        }
      },
      {
        "w": 4,
        "h": 4,
        "name": "Consul – Number of Warning Health Checks",
        "queries": [
          {
            "query": "SELECT count(\"check_id\") as \"Number Warning\" FROM \":db:\".\":rp:\".\"consul_health_checks\" WHERE time > :dashboardTime: AND \"host\" = :host: AND \"status\" = 'warning' GROUP BY time(:interval:), \"service_name\"",
            "wheres": ["\"status\" = 'warning'"],
            "groupbys": ["\"service_name\""],
            "label": "count"
          }
        ],
        "type": "line",
        "axes": {
          "x": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y": {
            "prefix": "",
            "suffix": "count",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y2": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          }
        }
      }
    ],
    "templates": [
      {
        "tempVar": ":host:",
        "id": "",
        "type": "tagValues",
        "label": "",
        "values": [],
        "query": {
          "influxql": "SHOW TAG VALUES ON :database: FROM :measurement: WITH KEY=:tagKey:",
          "db": "telegraf",
          "measurement": "consul_health_checks",
          "tagKey": "host",
          "fieldKey": ""
        }
      }
    ]
  }
}
