{
  "id": "fceed632-1a24-49d4-bb63-22b0aa10124f",
  "meta": {
    "name": "NSQ",
    "measurements": ["nsq_channel", "nsq_server", "nsq_topic"],
    "version": "1.0",
    "dashboardVersion": "1.x",
    "description": "Dashboard for the telegraf input plug-in: NSQ",
    "author": "influxdata",
    "license": "MIT",
    "icon": "",
    "url": "https://github.com/influxdata/telegraf/tree/master/plugins/inputs/nsq"
  },
  "data": {
    "cells": [
      {
        "w": 4,
        "h": 4,
        "name": "NSQ - Channel Client Count",
        "queries": [
          {
            "query": "SELECT mean(\"client_count\") AS \"client_count\" FROM \":db:\".\":rp:\".\"nsq_channel\" WHERE time > :dashboardTime: AND \"host\" = :host: GROUP BY time(:interval:), \"topic\",\"channel\"",
            "groupbys": ["\"topic\"", "\"channel\""]
          }
        ],
        "type": "line",
        "axes": {
          "x": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y2": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          }
        }
      },
      {
        "w": 4,
        "h": 4,
        "name": "NSQ - Channel Messages Count",
        "queries": [
          {
            "query": "SELECT mean(\"message_count\") AS \"message_count\" FROM \":db:\".\":rp:\".\"nsq_channel\" WHERE time > :dashboardTime: AND \"host\" = :host: GROUP BY time(:interval:), \"topic\",\"channel\"",
            "groupbys": ["\"topic\"", "\"channel\""]
          }
        ],
        "type": "line",
        "axes": {
          "x": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y2": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          }
        }
      },
      {
        "w": 4,
        "h": 4,
        "name": "NSQ - Topic Count",
        "queries": [
          {
            "query": "SELECT mean(\"topic_count\") AS \"topic_count\" FROM \":db:\".\":rp:\".\"nsq_server\" WHERE time > :dashboardTime: AND \"host\" = :host: GROUP BY time(:interval:)"
          }
        ],
        "type": "line",
        "axes": {
          "x": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y2": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          }
        }
      },
      {
        "w": 4,
        "h": 4,
        "name": "NSQ - Server Count",
        "queries": [
          {
            "query": "SELECT mean(\"server_count\") AS \"server_count\" FROM \":db:\".\":rp:\".\"nsq_server\" WHERE time > :dashboardTime: AND \"host\" = :host: GROUP BY time(:interval:)"
          }
        ],
        "type": "line",
        "axes": {
          "x": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y2": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          }
        }
      },
      {
        "w": 4,
        "h": 4,
        "name": "NSQ - Topic Messages",
        "queries": [
          {
            "query": "SELECT mean(\"depth\") AS \"depth\" FROM \":db:\".\":rp:\".\"nsq_topic\" WHERE time > :dashboardTime: AND \"host\" = :host: GROUP BY time(:interval:), \"topic\"",
            "groupbys": ["\"topic\""]
          }
        ],
        "type": "line",
        "axes": {
          "x": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y2": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          }
        }
      },
      {
        "w": 4,
        "h": 4,
        "name": "NSQ - Topic Messages on Disk",
        "queries": [
          {
            "query": "SELECT mean(\"backend_depth\") AS \"backend_depth\" FROM \":db:\".\":rp:\".\"nsq_topic\" WHERE time > :dashboardTime: AND \"host\" = :host: GROUP BY time(:interval:), \"topic\"",
            "groupbys": ["\"topic\""]
          }
        ],
        "type": "line",
        "axes": {
          "x": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y2": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          }
        }
      },
      {
        "w": 4,
        "h": 4,
        "name": "NSQ - Topic Ingress",
        "queries": [
          {
            "query": "SELECT non_negative_derivative(max(\"message_count\")) AS \"messages_per_second\" FROM \":db:\".\":rp:\".\"nsq_topic\" WHERE time > :dashboardTime: AND \"host\" = :host: GROUP BY time(:interval:), \"topic\",\"host\"",
            "groupbys": ["\"topic\"", "\"host\""]
          }
        ],
        "type": "line",
        "axes": {
          "x": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y2": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          }
        }
      },
      {
        "w": 4,
        "h": 4,
        "name": "NSQ topic egress",
        "queries": [
          {
            "query": "SELECT non_negative_derivative(max(\"message_count\")) - non_negative_derivative(max(\"depth\")) AS \"messages_per_second\" FROM \":db:\".\":rp:\".\"nsq_topic\" WHERE time > :dashboardTime: AND \"host\" = :host: GROUP BY time(:interval:), \"topic\",\"host\"",
            "groupbys": ["\"topic\"", "\"host\""]
          }
        ],
        "type": "line",
        "axes": {
          "x": {
            "prefix": "",
            "suffix": "",
            "base": "10",
            "scale": "linear",
            "label": "",
            "bounds": ["", ""]
          },
          "y": {
            "prefix": "",
            "suffix": "",
            "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": "nsq_channel",
          "tagKey": "host",
          "fieldKey": ""
        }
      }
    ]
  }
}
