TooAngel/screeps

View on GitHub
grafana/main/db/rooms-tables.json

Summary

Maintainability
Test Coverage
{
  "__inputs": [
    {
      "name": "DS_TOOANGELS",
      "label": "tooAngels",
      "description": "",
      "type": "datasource",
      "pluginId": "graphite",
      "pluginName": "Graphite"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "4.4.3"
    },
    {
      "type": "datasource",
      "id": "graphite",
      "name": "Graphite",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": []
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "hideControls": false,
  "id": null,
  "links": [],
  "refresh": "30s",
  "rows": [
    {
      "collapse": false,
      "height": "250px",
      "panels": [
        {
          "columns": [
            {
              "text": "Current",
              "value": "current"
            },
            {
              "text": "Max",
              "value": "max"
            },
            {
              "text": "Avg",
              "value": "avg"
            }
          ],
          "datasource": "${DS_TOOANGELS}",
          "editable": true,
          "error": false,
          "fontSize": "100%",
          "hideTimeOverride": false,
          "id": 3,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 6,
          "styles": [
            {
              "alias": "",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "alias": "",
              "colorMode": "cell",
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 3,
              "pattern": "Current",
              "thresholds": [
                "33",
                "66"
              ],
              "type": "number",
              "unit": "percent"
            },
            {
              "alias": "",
              "colorMode": "cell",
              "colors": [
                "rgba(44, 30, 1, 0.9)",
                "rgba(237, 196, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 3,
              "pattern": "Max",
              "thresholds": [
                "1",
                "99"
              ],
              "type": "number",
              "unit": "percent"
            },
            {
              "alias": "",
              "colorMode": "cell",
              "colors": [
                "rgba(47, 30, 0, 0.9)",
                "rgba(241, 216, 42, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 3,
              "pattern": "Avg",
              "thresholds": [
                "1",
                "75"
              ],
              "type": "number",
              "unit": "percent"
            }
          ],
          "targets": [
            {
              "hide": true,
              "refId": "A",
              "target": "reduceSeries(mapSeries(removeEmptySeries(screeps.$player.room.$room.controller.*), 4), 'asPercent', 6, 'progress', 'progressTotal')",
              "textEditor": true
            },
            {
              "hide": false,
              "refId": "B",
              "target": "aliasSub(aliasByNode(#A, 4), \"(.*)\", \"\\1 %\")",
              "targetFull": "aliasSub(aliasByNode(reduceSeries(mapSeries(removeEmptySeries(screeps.$player.room.$room.controller.*), 4), 'asPercent', 6, 'progress', 'progressTotal'), 4), \"(.*)\", \"\\1 %\")",
              "textEditor": true
            }
          ],
          "timeFrom": "$T",
          "timeShift": null,
          "title": "Controller percent",
          "transform": "timeseries_aggregations",
          "type": "table"
        },
        {
          "columns": [
            {
              "text": "Current",
              "value": "current"
            },
            {
              "text": "Avg",
              "value": "avg"
            },
            {
              "text": "Min",
              "value": "min"
            },
            {
              "text": "Max",
              "value": "max"
            }
          ],
          "editable": true,
          "error": false,
          "fontSize": "100%",
          "id": 1,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 6,
          "styles": [
            {
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "colorMode": "cell",
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [
                "300",
                "1000"
              ],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "refId": "A",
              "target": "aliasByNode(removeEmptySeries(screeps.$player.room.$room.energy.available), 4)"
            }
          ],
          "timeFrom": "$T",
          "timeShift": null,
          "title": "Energy",
          "transform": "timeseries_aggregations",
          "type": "table"
        },
        {
          "columns": [
            {
              "text": "Current",
              "value": "current"
            },
            {
              "text": "Max",
              "value": "max"
            },
            {
              "text": "Avg",
              "value": "avg"
            }
          ],
          "datasource": "${DS_TOOANGELS}",
          "editable": true,
          "error": false,
          "fontSize": "100%",
          "hideTimeOverride": false,
          "id": 5,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 6,
          "styles": [
            {
              "alias": "",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "alias": "",
              "colorMode": "cell",
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 6,
              "pattern": "Current",
              "thresholds": [
                "0.0001",
                " 0.01"
              ],
              "type": "number",
              "unit": "percent"
            },
            {
              "alias": "",
              "colorMode": "cell",
              "colors": [
                "rgba(44, 30, 1, 0.9)",
                "rgba(237, 196, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 6,
              "pattern": "Max",
              "thresholds": [
                "0.0001",
                " 0.01"
              ],
              "type": "number",
              "unit": "percent"
            },
            {
              "alias": "",
              "colorMode": "cell",
              "colors": [
                "rgba(47, 30, 0, 0.9)",
                "rgba(241, 216, 42, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 6,
              "pattern": "Avg",
              "thresholds": [
                "0.0001",
                " 0.01"
              ],
              "type": "number",
              "unit": "percent"
            }
          ],
          "targets": [
            {
              "hide": true,
              "refId": "A",
              "target": "reduceSeries(mapSeries(removeEmptySeries(screeps.$player.room.$room.controller.*), 4), 'asPercent', 6, 'progress', 'progressTotal')",
              "textEditor": true
            },
            {
              "hide": true,
              "refId": "B",
              "target": "perSecond(#A)",
              "targetFull": "perSecond(reduceSeries(mapSeries(removeEmptySeries(screeps.$player.room.$room.controller.*), 4), 'asPercent', 6, 'progress', 'progressTotal'))",
              "textEditor": true
            },
            {
              "hide": false,
              "refId": "C",
              "target": "aliasSub(aliasByNode(#B, 4), \"(.*)\", \"\\1 %/s\")",
              "targetFull": "aliasSub(aliasByNode(perSecond(reduceSeries(mapSeries(removeEmptySeries(screeps.$player.room.$room.controller.*), 4), 'asPercent', 6, 'progress', 'progressTotal')), 4), \"(.*)\", \"\\1 %/s\")",
              "textEditor": true
            }
          ],
          "timeFrom": "$T",
          "timeShift": null,
          "title": "Controller %/s",
          "transform": "timeseries_aggregations",
          "type": "table"
        },
        {
          "columns": [
            {
              "text": "Current",
              "value": "current"
            },
            {
              "text": "Avg",
              "value": "avg"
            },
            {
              "text": "Min",
              "value": "min"
            },
            {
              "text": "Max",
              "value": "max"
            }
          ],
          "editable": true,
          "error": false,
          "fontSize": "100%",
          "id": 2,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "span": 6,
          "styles": [
            {
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "alias": "Room",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "pattern": "Metric",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "",
              "colorMode": "cell",
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(230, 160, 102, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [
                "10000",
                "200000"
              ],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "refId": "A",
              "target": "aliasByNode(removeEmptySeries(screeps.$player.room.$room.storage.energy), 4)"
            }
          ],
          "timeFrom": "$T",
          "timeShift": null,
          "title": "Storage",
          "transform": "timeseries_aggregations",
          "type": "table"
        },
        {
          "columns": [
            {
              "text": "Current",
              "value": "current"
            },
            {
              "text": "Max",
              "value": "max"
            },
            {
              "text": "Avg",
              "value": "avg"
            },
            {
              "text": "Min",
              "value": "min"
            },
            {
              "text": "Count",
              "value": "count"
            }
          ],
          "datasource": "${DS_TOOANGELS}",
          "editable": true,
          "error": false,
          "fontSize": "100%",
          "hideTimeOverride": false,
          "id": 7,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": null,
            "desc": false
          },
          "span": 12,
          "styles": [
            {
              "alias": "",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "alias": "",
              "colorMode": "cell",
              "colors": [
                "rgba(140, 71, 2, 0.97)",
                "rgba(125, 110, 6, 0.89)",
                "rgba(239, 0, 0, 0.9)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 3,
              "pattern": "Min",
              "thresholds": [
                "1",
                "50"
              ],
              "type": "number",
              "unit": "percent"
            },
            {
              "alias": "Ticks caught",
              "colorMode": "cell",
              "colors": [
                "rgba(58, 39, 7, 0.97)",
                "rgba(209, 126, 11, 0.89)",
                "rgba(114, 145, 41, 0.9)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "pattern": "Count",
              "thresholds": [
                "200",
                "500"
              ],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "Room",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "pattern": "Metric",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            },
            {
              "alias": "",
              "colorMode": "cell",
              "colors": [
                "rgba(164, 130, 0, 0.9)",
                "rgba(193, 129, 0, 0.89)",
                "rgba(147, 72, 8, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 3,
              "pattern": "/.*/",
              "thresholds": [
                "10",
                " 50"
              ],
              "type": "number",
              "unit": "percent"
            }
          ],
          "targets": [
            {
              "hide": true,
              "refId": "A",
              "target": "removeEmptySeries(screeps.$player.room.$room.cpu)",
              "textEditor": true
            },
            {
              "hide": true,
              "refId": "B",
              "target": "asPercent(#A, screeps.$player.cpu.used)",
              "targetFull": "asPercent(removeEmptySeries(screeps.$player.room.$room.cpu), screeps.$player.cpu.used)",
              "textEditor": true
            },
            {
              "hide": false,
              "refId": "C",
              "target": "aliasByNode(#B, 4)",
              "targetFull": "aliasByNode(asPercent(removeEmptySeries(screeps.$player.room.$room.cpu), screeps.$player.cpu.used), 4)",
              "textEditor": true
            }
          ],
          "timeFrom": "$T",
          "timeShift": null,
          "title": "% CPU used by rooms / total",
          "transform": "timeseries_aggregations",
          "type": "table"
        }
      ],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Row",
      "titleSize": "h6"
    }
  ],
  "schemaVersion": 14,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TOOANGELS}",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "player",
        "options": [],
        "query": "screeps.*",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TOOANGELS}",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "room",
        "options": [],
        "query": "screeps.$player.room.*",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "auto": false,
        "auto_count": 30,
        "auto_min": "10s",
        "current": {
          "text": "1h",
          "value": "1h"
        },
        "hide": 0,
        "label": "From t - T",
        "name": "T",
        "options": [
          {
            "selected": false,
            "text": "1m",
            "value": "1m"
          },
          {
            "selected": false,
            "text": "10m",
            "value": "10m"
          },
          {
            "selected": false,
            "text": "30m",
            "value": "30m"
          },
          {
            "selected": true,
            "text": "1h",
            "value": "1h"
          },
          {
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "selected": false,
            "text": "12h",
            "value": "12h"
          },
          {
            "selected": false,
            "text": "1d",
            "value": "1d"
          },
          {
            "selected": false,
            "text": "7d",
            "value": "7d"
          },
          {
            "selected": false,
            "text": "14d",
            "value": "14d"
          },
          {
            "selected": false,
            "text": "30d",
            "value": "30d"
          }
        ],
        "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
        "refresh": 2,
        "type": "interval"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "browser",
  "title": "Rooms tables",
  "version": 9
}