{
  "__inputs": [
    {
      "name": "DS_INFLUXDB_CM",
      "label": "InfluxDB CM",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__elements": [
    {
      "name": "Events (Triggered)",
      "uid": "7Ly-1o6nk",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "Total"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 3,
          "w": 6,
          "x": 0,
          "y": 1
        },
        "id": 6,
        "options": {
          "colorMode": "none",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "value"
        },
        "pluginVersion": "9.0.2",
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group()\n  |> count()\n  |> yield(name: \"Total\")",
            "refId": "A"
          },
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "hide": false,
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group()\n  |> count()\n  |> yield(name: \"Total\")",
            "refId": "B"
          }
        ],
        "title": "Events (Triggered)",
        "type": "stat"
      }
    },
    {
      "name": "Total API Calls",
      "uid": "agHsLTenz",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 16,
          "w": 7,
          "x": 17,
          "y": 1
        },
        "id": 20,
        "options": {
          "colorMode": "none",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "sum"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "auto"
        },
        "pluginVersion": "9.0.2",
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "hide": false,
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"apiHealth\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"used\")\n  |> aggregateWindow(every: 10m, fn: sum)\n  |> keep(columns: [\"_value\"])",
            "refId": "B"
          }
        ],
        "title": "Total API Calls",
        "transformations": [
          {
            "id": "filterByValue",
            "options": {
              "filters": [
                {
                  "config": {
                    "id": "isNull",
                    "options": {}
                  },
                  "fieldName": "_value"
                }
              ],
              "match": "any",
              "type": "exclude"
            }
          }
        ],
        "type": "stat"
      }
    },
    {
      "name": "Events per Second",
      "uid": "RW9fJoenk",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 2,
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "/sec"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 2,
          "w": 6,
          "x": 0,
          "y": 4
        },
        "id": 9,
        "interval": "60s",
        "options": {
          "colorMode": "none",
          "graphMode": "area",
          "justifyMode": "center",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "text": {},
          "textMode": "value"
        },
        "pluginVersion": "9.0.2",
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group()\n  |> aggregateWindow(every: 1m, fn: count)\n  |> toFloat()\n  |> map(fn: (r) => ({r with _value: r._value / 60.0 }))\n  |> mean()\n  |> yield(name: \"Total\")",
            "refId": "A"
          },
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "hide": false,
            "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group()\n  |> aggregateWindow(every: 1m, fn: count)\n  |> toFloat()\n  |> map(fn: (r) => ({r with _value: r._value / 60.0 }))\n  |> mean()\n  |> yield(name: \"Total\")",
            "refId": "B"
          }
        ],
        "type": "stat"
      }
    },
    {
      "name": "Events per Minute",
      "uid": "kl7f1oe7z",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 0,
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "/min"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 2,
          "w": 6,
          "x": 0,
          "y": 6
        },
        "id": 7,
        "options": {
          "colorMode": "none",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "text": {},
          "textMode": "value"
        },
        "pluginVersion": "9.0.2",
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group()\n  |> aggregateWindow(every: 60s, fn: count)\n  |> mean()\n  |> yield(name: \"Total\")",
            "refId": "A"
          },
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "hide": false,
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group()\n  |> aggregateWindow(every: 60s, fn: count)\n  |> mean()\n  |> yield(name: \"Total\")",
            "refId": "B"
          }
        ],
        "type": "stat"
      }
    },
    {
      "name": "Events per Hour",
      "uid": "BtTfJoe7k",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 0,
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "/hour"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 2,
          "w": 6,
          "x": 0,
          "y": 8
        },
        "id": 8,
        "interval": "60s",
        "options": {
          "colorMode": "none",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "text": {},
          "textMode": "value"
        },
        "pluginVersion": "9.0.2",
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group()\n  |> aggregateWindow(every: 1h, fn: count)\n  |> mean()\n  |> yield(name: \"Total\")",
            "refId": "A"
          },
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "hide": false,
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group()\n  |> aggregateWindow(every: 1h, fn: count)\n  |> mean()\n  |> yield(name: \"Total\")",
            "refId": "B"
          }
        ],
        "type": "stat"
      }
    },
    {
      "name": "Events By Type",
      "uid": "YoMGrT67z",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              }
            },
            "mappings": [],
            "unit": "none"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 5,
          "x": 6,
          "y": 9
        },
        "id": 30,
        "options": {
          "displayLabels": [
            "percent",
            "name"
          ],
          "legend": {
            "displayMode": "hidden",
            "placement": "right",
            "values": []
          },
          "pieType": "pie",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": true
          },
          "tooltip": {
            "mode": "multi",
            "sort": "none"
          }
        },
        "pluginVersion": "9.0.2",
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group(columns: [\"activityType\"])\n  |> count()\n  |> group()\n  |> keep(columns: [\"activityType\",\"_value\"])",
            "refId": "A"
          }
        ],
        "title": "Events By Type",
        "transformations": [],
        "type": "piechart"
      }
    },
    {
      "name": "Avg Process Time",
      "uid": "pgB-Jo6nz",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 0,
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "ms"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 2,
          "w": 3,
          "x": 0,
          "y": 10
        },
        "id": 14,
        "options": {
          "colorMode": "none",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "text": {},
          "textMode": "value"
        },
        "pluginVersion": "9.0.2",
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"processingTime\")\n  |> mean()\n  |> yield(name: \"Total\")",
            "refId": "A"
          }
        ],
        "title": "Avg Processing Time",
        "transformations": [
          {
            "id": "reduce",
            "options": {
              "includeTimeField": false,
              "mode": "seriesToRows",
              "reducers": [
                "mean"
              ]
            }
          }
        ],
        "type": "stat"
      }
    },
    {
      "name": "Avg Queued Time",
      "uid": "FkJaJoenk",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 0,
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "ms"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 2,
          "w": 3,
          "x": 3,
          "y": 10
        },
        "id": 15,
        "options": {
          "colorMode": "none",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "text": {},
          "textMode": "value"
        },
        "pluginVersion": "9.0.2",
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"queuedTime\")\n  |> mean()\n  |> yield(name: \"Total\")",
            "refId": "A"
          }
        ],
        "title": "Avg Queued Time",
        "transformations": [
          {
            "id": "reduce",
            "options": {
              "includeTimeField": false,
              "mode": "seriesToRows",
              "reducers": [
                "mean"
              ]
            }
          }
        ],
        "type": "stat"
      }
    },
    {
      "name": "Active Subreddits",
      "uid": "yR2-1T6nk",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 0,
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "none"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 5,
          "w": 3,
          "x": 0,
          "y": 12
        },
        "id": 16,
        "options": {
          "colorMode": "none",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "text": {},
          "textMode": "value"
        },
        "pluginVersion": "9.0.2",
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "  from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group(columns: [\"subreddit\"])\n  |> keep(columns: [\"subreddit\"])\n  |> distinct(column: \"subreddit\")\n  |> count()\n  |> map(fn: (r) => ({_value: r.subreddit}))",
            "refId": "A"
          }
        ],
        "title": "Active Subreddits",
        "transformations": [
          {
            "id": "seriesToRows",
            "options": {}
          },
          {
            "id": "reduce",
            "options": {
              "includeTimeField": false,
              "mode": "seriesToRows",
              "reducers": [
                "distinctCount"
              ]
            }
          }
        ],
        "type": "stat"
      }
    },
    {
      "name": "Active Bots",
      "uid": "5zEoro67k",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 0,
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "none"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 5,
          "w": 3,
          "x": 3,
          "y": 12
        },
        "id": 31,
        "options": {
          "colorMode": "none",
          "graphMode": "none",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "text": {},
          "textMode": "value"
        },
        "pluginVersion": "9.0.2",
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"apiHealth\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"remaining\")\n  |> keep(columns: [\"bot\"])\n  |> distinct(column: \"bot\")\n  |> keep(columns: [\"_value\"])\n  |> yield(name: \"name\")",
            "refId": "A"
          }
        ],
        "title": "Active Bots",
        "transformations": [
          {
            "id": "reduce",
            "options": {
              "includeTimeField": false,
              "mode": "seriesToRows",
              "reducers": [
                "distinctCount"
              ]
            }
          }
        ],
        "type": "stat"
      }
    },
    {
      "name": "API Usage Per Bot",
      "uid": "oPvaJTe7k",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisLabel": "Api Calls",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "lineInterpolation": "linear",
              "lineWidth": 2,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "never",
              "spanNulls": true,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "area"
              }
            },
            "mappings": [],
            "max": 600,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "#EAB839",
                  "value": 400
                },
                {
                  "color": "dark-red",
                  "value": 500
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 7,
          "w": 24,
          "x": 0,
          "y": 18
        },
        "id": 18,
        "interval": "30s",
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "hidden",
            "placement": "bottom"
          },
          "tooltip": {
            "mode": "multi",
            "sort": "desc"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"apiHealth\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"remaining\")\n  |> group(columns: [\"bot\"])\n  |> map(fn: (r) => ({r with _value: 600 - r._value}))\n  |> aggregateWindow(every: v.windowPeriod, fn: max)\n  |> keep(columns: [\"table\",\"_value\",\"_start\",\"_stop\",\"_time\",\"bot\"])",
            "refId": "A"
          }
        ],
        "title": "API Usage Per Bot",
        "transformations": [],
        "type": "timeseries"
      }
    },
    {
      "name": "Triggered Checks",
      "uid": "WK99_o6nk",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisLabel": "# of Checks/min",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "lineInterpolation": "linear",
              "lineWidth": 2,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "never",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green"
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": [
            {
              "matcher": {
                "id": "byFrameRefID",
                "options": "B"
              },
              "properties": [
                {
                  "id": "displayName",
                  "value": "Total"
                }
              ]
            }
          ]
        },
        "gridPos": {
          "h": 8,
          "w": 24,
          "x": 0,
          "y": 47
        },
        "id": 28,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "hidden",
            "placement": "bottom"
          },
          "tooltip": {
            "mode": "multi",
            "sort": "desc"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"triggeredEntity\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r.entityType == \"check\" and r._field == \"name\")\n  |> map(fn: (r) => ({r with entName: r._value}))\n  |> group(columns: [\"entName\"])\n  |> aggregateWindow(every: v.windowPeriod, fn: count)",
            "refId": "A"
          }
        ],
        "title": "Triggered Checks",
        "type": "timeseries"
      }
    },
    {
      "name": "Triggered Rules",
      "uid": "DtJzXoe7z",
      "kind": 1,
      "model": {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisLabel": "# of Rules/min",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "lineInterpolation": "linear",
              "lineWidth": 2,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "never",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green"
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": [
            {
              "matcher": {
                "id": "byFrameRefID",
                "options": "B"
              },
              "properties": [
                {
                  "id": "displayName",
                  "value": "Total"
                }
              ]
            }
          ]
        },
        "gridPos": {
          "h": 8,
          "w": 24,
          "x": 0,
          "y": 55
        },
        "id": 29,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "hidden",
            "placement": "bottom"
          },
          "tooltip": {
            "mode": "multi",
            "sort": "desc"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB_CM}"
            },
            "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"triggeredEntity\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r.entityType == \"rule\" and r._field == \"name\")\n  |> map(fn: (r) => ({r with entName: r._value}))\n  |> group(columns: [\"entName\"])\n  |> aggregateWindow(every: v.windowPeriod, fn: count)",
            "refId": "A"
          }
        ],
        "title": "Triggered Rules",
        "type": "timeseries"
      }
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.0.2"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "piechart",
      "name": "Pie chart",
      "version": ""
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "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"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1657558978803,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 11,
      "panels": [],
      "title": "By The Numbers",
      "type": "row"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "Total"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 6,
        "x": 0,
        "y": 1
      },
      "id": 6,
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T12:54:37-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T12:54:37-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Events (Triggered)",
        "type": "stat",
        "uid": "7Ly-1o6nk",
        "version": 1
      },
      "options": {
        "colorMode": "none",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value"
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group()\n  |> count()\n  |> yield(name: \"Total\")",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "hide": false,
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group()\n  |> count()\n  |> yield(name: \"Total\")",
          "refId": "B"
        }
      ],
      "title": "Events (Triggered)",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": [],
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 6,
        "y": 1
      },
      "id": 26,
      "options": {
        "displayLabels": [
          "percent",
          "name"
        ],
        "legend": {
          "displayMode": "hidden",
          "placement": "right",
          "values": []
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group(columns: [\"sourceIdentifier\"])\n  |> count()\n  |> group()\n  |> keep(columns: [\"sourceIdentifier\",\"_value\"])",
          "refId": "A"
        }
      ],
      "title": "Events By Source",
      "transformations": [],
      "type": "piechart"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "decimals": 0,
          "mappings": [],
          "max": 600,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 11,
        "y": 1
      },
      "id": 24,
      "options": {
        "displayMode": "gradient",
        "minVizHeight": 20,
        "minVizWidth": 0,
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [],
          "fields": "/^_value$/",
          "values": true
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"apiHealth\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"used\")\n  |> aggregateWindow(every: 10m, fn: sum)\n  |> mean()\n  |> group(columns: [\"bot\"])\n  |> group()\n  |> keep(columns: [\"table\",\"_value\",\"_start\",\"_stop\",\"_time\",\"bot\"])",
          "refId": "A"
        }
      ],
      "title": "Average Total API Quota Usage",
      "transformations": [
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "_value"
              }
            ]
          }
        }
      ],
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 16,
        "w": 7,
        "x": 17,
        "y": 1
      },
      "id": 20,
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T14:06:26-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T15:52:22-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Total API Calls",
        "type": "stat",
        "uid": "agHsLTenz",
        "version": 4
      },
      "options": {
        "colorMode": "none",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "hide": false,
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"apiHealth\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"used\")\n  |> aggregateWindow(every: 10m, fn: sum)\n  |> keep(columns: [\"_value\"])",
          "refId": "B"
        }
      ],
      "title": "Total API Calls",
      "transformations": [
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "isNull",
                  "options": {}
                },
                "fieldName": "_value"
              }
            ],
            "match": "any",
            "type": "exclude"
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "/sec"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 0,
        "y": 4
      },
      "id": 9,
      "interval": "60s",
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T12:55:14-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T12:55:14-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Events per Second",
        "type": "stat",
        "uid": "RW9fJoenk",
        "version": 1
      },
      "options": {
        "colorMode": "none",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group()\n  |> aggregateWindow(every: 1m, fn: count)\n  |> toFloat()\n  |> map(fn: (r) => ({r with _value: r._value / 60.0 }))\n  |> mean()\n  |> yield(name: \"Total\")",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "hide": false,
          "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group()\n  |> aggregateWindow(every: 1m, fn: count)\n  |> toFloat()\n  |> map(fn: (r) => ({r with _value: r._value / 60.0 }))\n  |> mean()\n  |> yield(name: \"Total\")",
          "refId": "B"
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "/min"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 0,
        "y": 6
      },
      "id": 7,
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T12:54:51-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T12:54:51-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Events per Minute",
        "type": "stat",
        "uid": "kl7f1oe7z",
        "version": 1
      },
      "options": {
        "colorMode": "none",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group()\n  |> aggregateWindow(every: 60s, fn: count)\n  |> mean()\n  |> yield(name: \"Total\")",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "hide": false,
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group()\n  |> aggregateWindow(every: 60s, fn: count)\n  |> mean()\n  |> yield(name: \"Total\")",
          "refId": "B"
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "/hour"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 0,
        "y": 8
      },
      "id": 8,
      "interval": "60s",
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T12:55:01-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T12:55:01-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Events per Hour",
        "type": "stat",
        "uid": "BtTfJoe7k",
        "version": 1
      },
      "options": {
        "colorMode": "none",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group()\n  |> aggregateWindow(every: 1h, fn: count)\n  |> mean()\n  |> yield(name: \"Total\")",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "hide": false,
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group()\n  |> aggregateWindow(every: 1h, fn: count)\n  |> mean()\n  |> yield(name: \"Total\")",
          "refId": "B"
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": [],
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 6,
        "y": 9
      },
      "id": 30,
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T15:58:20-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T15:58:20-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Events By Type",
        "type": "piechart",
        "uid": "YoMGrT67z",
        "version": 1
      },
      "options": {
        "displayLabels": [
          "percent",
          "name"
        ],
        "legend": {
          "displayMode": "hidden",
          "placement": "right",
          "values": []
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group(columns: [\"activityType\"])\n  |> count()\n  |> group()\n  |> keep(columns: [\"activityType\",\"_value\"])",
          "refId": "A"
        }
      ],
      "title": "Events By Type",
      "transformations": [],
      "type": "piechart"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-YlBl"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 11,
        "y": 9
      },
      "id": 23,
      "options": {
        "displayMode": "gradient",
        "minVizHeight": 20,
        "minVizWidth": 0,
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [],
          "fields": "",
          "values": true
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"apiHealth\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"used\")\n  |> sum()\n  |> group(columns: [\"bot\"])\n  |> group()\n  |> map(fn: (r) => ({Bot: r.bot, Calls: r._value}))",
          "refId": "A"
        }
      ],
      "title": "Total API Calls",
      "transformations": [
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Calls"
              }
            ]
          }
        }
      ],
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "ms"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 0,
        "y": 10
      },
      "id": 14,
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T12:54:33-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T15:55:17-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Avg Process Time",
        "type": "stat",
        "uid": "pgB-Jo6nz",
        "version": 2
      },
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"processingTime\")\n  |> mean()\n  |> yield(name: \"Total\")",
          "refId": "A"
        }
      ],
      "title": "Avg Processing Time",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "seriesToRows",
            "reducers": [
              "mean"
            ]
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "ms"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 3,
        "y": 10
      },
      "id": 15,
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T12:54:30-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T12:54:30-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Avg Queued Time",
        "type": "stat",
        "uid": "FkJaJoenk",
        "version": 1
      },
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"queuedTime\")\n  |> mean()\n  |> yield(name: \"Total\")",
          "refId": "A"
        }
      ],
      "title": "Avg Queued Time",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "seriesToRows",
            "reducers": [
              "mean"
            ]
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 0,
        "y": 12
      },
      "id": 16,
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T12:54:27-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T12:54:27-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Active Subreddits",
        "type": "stat",
        "uid": "yR2-1T6nk",
        "version": 1
      },
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "  from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group(columns: [\"subreddit\"])\n  |> keep(columns: [\"subreddit\"])\n  |> distinct(column: \"subreddit\")\n  |> count()\n  |> map(fn: (r) => ({_value: r.subreddit}))",
          "refId": "A"
        }
      ],
      "title": "Active Subreddits",
      "transformations": [
        {
          "id": "seriesToRows",
          "options": {}
        },
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "seriesToRows",
            "reducers": [
              "distinctCount"
            ]
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 3,
        "y": 12
      },
      "id": 31,
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T16:04:39-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T16:08:20-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Active Bots",
        "type": "stat",
        "uid": "5zEoro67k",
        "version": 2
      },
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "9.0.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"apiHealth\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"remaining\")\n  |> keep(columns: [\"bot\"])\n  |> distinct(column: \"bot\")\n  |> keep(columns: [\"_value\"])\n  |> yield(name: \"name\")",
          "refId": "A"
        }
      ],
      "title": "Active Bots",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "seriesToRows",
            "reducers": [
              "distinctCount"
            ]
          }
        }
      ],
      "type": "stat"
    },
    {
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 17
      },
      "id": 4,
      "title": "Over Time",
      "type": "row"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "Api Calls",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "area"
            }
          },
          "mappings": [],
          "max": 600,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 400
              },
              {
                "color": "dark-red",
                "value": 500
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 18
      },
      "id": 18,
      "interval": "30s",
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T12:54:23-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T13:43:51-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "API Usage Per Bot",
        "type": "timeseries",
        "uid": "oPvaJTe7k",
        "version": 3
      },
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"apiHealth\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"remaining\")\n  |> group(columns: [\"bot\"])\n  |> map(fn: (r) => ({r with _value: 600 - r._value}))\n  |> aggregateWindow(every: v.windowPeriod, fn: max)\n  |> keep(columns: [\"table\",\"_value\",\"_start\",\"_stop\",\"_time\",\"bot\"])",
          "refId": "A"
        }
      ],
      "title": "API Usage Per Bot",
      "transformations": [],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "# of Events/min",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byFrameRefID",
              "options": "B"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Total Triggered"
              }
            ]
          },
          {
            "matcher": {
              "id": "byFrameRefID",
              "options": "A"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Total"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 25
      },
      "id": 13,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group(columns: [\"eventId\"])\n  |> aggregateWindow(every: v.windowPeriod, fn: count)\n  |> yield(name: \"totalPerSub\")",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "hide": false,
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group(columns: [\"eventId\"])\n  |> aggregateWindow(every: v.windowPeriod, fn: count)\n  |> yield(name: \"Total\")",
          "refId": "B"
        }
      ],
      "title": "Events",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "# of Events/min",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byFrameRefID",
              "options": "B"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Total"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 33
      },
      "id": 2,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group(columns: [\"eventId\", \"subreddit\"])\n  |> aggregateWindow(every: v.windowPeriod, fn: count)\n  |> yield(name: \"totalPerSub\")",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "hide": true,
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> group(columns: [\"_value\"])\n  |> aggregateWindow(every: v.windowPeriod, fn: count)\n  |> yield(name: \"Total\")",
          "refId": "B"
        }
      ],
      "title": "Events per Subreddit",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "# of Events/min",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byFrameRefID",
              "options": "B"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Total"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 40
      },
      "id": 12,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group(columns: [\"eventId\", \"subreddit\"])\n  |> aggregateWindow(every: v.windowPeriod, fn: count)\n  |> yield(name: \"totalPerSub\")",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "hide": true,
          "query": "// v.windowPeriod is a variable referring to the current optimized window period (currently: $interval)\nfrom(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\" and r[\"triggered\"] == \"1\")\n  |> group()\n  |> aggregateWindow(every: v.windowPeriod, fn: count)\n  |> yield(name: \"Total\")",
          "refId": "B"
        }
      ],
      "title": "Triggered Events per Subreddit",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "# of Checks/min",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byFrameRefID",
              "options": "B"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Total"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 47
      },
      "id": 28,
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T15:36:54-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T15:38:32-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Triggered Checks",
        "type": "timeseries",
        "uid": "WK99_o6nk",
        "version": 2
      },
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"triggeredEntity\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r.entityType == \"check\" and r._field == \"name\")\n  |> map(fn: (r) => ({r with entName: r._value}))\n  |> group(columns: [\"entName\"])\n  |> aggregateWindow(every: v.windowPeriod, fn: count)",
          "refId": "A"
        }
      ],
      "title": "Triggered Checks",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_INFLUXDB_CM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "# of Rules/min",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byFrameRefID",
              "options": "B"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Total"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 55
      },
      "id": 29,
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2022-07-07T15:39:27-04:00",
          "createdBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          },
          "folderName": "General",
          "folderUid": "",
          "updated": "2022-07-07T15:39:40-04:00",
          "updatedBy": {
            "avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
            "id": 1,
            "name": "admin"
          }
        },
        "name": "Triggered Rules",
        "type": "timeseries",
        "uid": "DtJzXoe7z",
        "version": 2
      },
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB_CM}"
          },
          "query": "from(bucket: \"${bucket}\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"triggeredEntity\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/ and r[\"subereddit\"] =~ /${subreddit:regex}/)\n  |> filter(fn: (r) => r.entityType == \"rule\" and r._field == \"name\")\n  |> map(fn: (r) => ({r with entName: r._value}))\n  |> group(columns: [\"entName\"])\n  |> aggregateWindow(every: v.windowPeriod, fn: count)",
          "refId": "A"
        }
      ],
      "title": "Triggered Rules",
      "type": "timeseries"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 36,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "definition": "buckets()",
        "description": "Bucket to load CM data from",
        "hide": 0,
        "includeAll": false,
        "label": "Influx Bucket",
        "multi": false,
        "name": "bucket",
        "options": [],
        "query": "buckets()",
        "refresh": 1,
        "regex": "/^[^_].*$/",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "definition": "from(bucket: \"${bucket}\")\n  |> range(start: -5m, stop: now())\n  |> filter(fn: (r) => r[\"_measurement\"] == \"apiHealth\")\n  |> filter(fn: (r) => r[\"_field\"] == \"remaining\")\n  |> keep(columns: [\"bot\"])\n  |> distinct(column: \"bot\")\n  |> keep(columns: [\"_value\"])\n  |> yield(name: \"name\")",
        "hide": 0,
        "includeAll": true,
        "label": "Bots",
        "multi": true,
        "name": "bot",
        "options": [],
        "query": "from(bucket: \"${bucket}\")\n  |> range(start: -5m, stop: now())\n  |> filter(fn: (r) => r[\"_measurement\"] == \"apiHealth\")\n  |> filter(fn: (r) => r[\"_field\"] == \"remaining\")\n  |> keep(columns: [\"bot\"])\n  |> distinct(column: \"bot\")\n  |> keep(columns: [\"_value\"])\n  |> yield(name: \"name\")",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB_CM}"
        },
        "definition": "  from(bucket: \"${bucket}\")\n  |> range(start: -12h, stop: now())\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/)\n  |> keep(columns: [\"subreddit\"])\n  |> distinct(column: \"subreddit\")\n  |> keep(columns: [\"_value\"])\n  |> yield(name: \"name\")",
        "hide": 0,
        "includeAll": true,
        "label": "Subreddits",
        "multi": true,
        "name": "subreddit",
        "options": [],
        "query": "  from(bucket: \"${bucket}\")\n  |> range(start: -12h, stop: now())\n  |> filter(fn: (r) => r[\"_measurement\"] == \"event\")\n  |> filter(fn: (r) => r[\"_field\"] == \"eventId\")\n  |> filter(fn: (r) => r[\"bot\"] =~ /${bot:regex}/)\n  |> keep(columns: [\"subreddit\"])\n  |> distinct(column: \"subreddit\")\n  |> keep(columns: [\"_value\"])\n  |> yield(name: \"name\")",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-3h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "ContextMod",
  "uid": "xKW3Mt67k",
  "version": 42,
  "weekStart": ""
}