Grafana dashboard: Windows Metrics
Description: Uses Telegraf, Victoriametrics, and Loki to display metrics and logs from a windows systems used by shift-mon

this Dashboard Shows Service status, Resource Usage, and Defend stats from windows. If you need help installing an observability stack or telegraf please reference our gitlab repo

https://gitlab.com/shiftsystems/shift-rmm/

{
  "__inputs": [
    {
      "name": "DS_SHIFT-METRICS",
      "label": "shift-metrics",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    },
    {
      "name": "DS_SHIFT-LOGS",
      "label": "shift-logs",
      "description": "",
      "type": "datasource",
      "pluginId": "loki",
      "pluginName": "Loki"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.3.6"
    },
    {
      "type": "panel",
      "id": "logs",
      "name": "Logs",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "loki",
      "name": "Loki",
      "version": "1.0.0"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "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,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 0,
        "y": 0
      },
      "id": 22,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "system_n_cpus{host=\"$host\",db=\"windows\"}",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          }
        }
      ],
      "title": "CPU Count",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 4,
        "y": 0
      },
      "id": 24,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          },
          "exemplar": false,
          "expr": "mem_total{host=\"$host\",db=\"windows\"}",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Memory",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 8,
        "y": 0
      },
      "id": 20,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "(system_uptime{host=\"$host\",db=\"windows\"}) / 86400",
          "interval": "",
          "legendFormat": "",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          }
        }
      ],
      "title": "uptime in days",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 12,
        "y": 0
      },
      "id": 12,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "system_load1{host=\"$host\",db=\"windows\"}",
          "interval": "",
          "legendFormat": "",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          }
        }
      ],
      "title": "Load 1",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 16,
        "y": 0
      },
      "id": 18,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "system_load15{host=\"$host\",db=\"windows\"}",
          "interval": "",
          "legendFormat": "",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          }
        }
      ],
      "title": "Load 15",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 4,
        "x": 20,
        "y": 0
      },
      "id": 26,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          },
          "exemplar": false,
          "expr": "disk_total{host=\"$host\",db=\"windows\"}",
          "instant": true,
          "interval": "",
          "legendFormat": "{{path}}",
          "refId": "A"
        }
      ],
      "title": "Disk Size",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "indexByName": {},
            "renameByName": {}
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 0,
        "y": 2
      },
      "id": 2,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "100 - cpu_usage_idle{host=\"$host\",db=\"windows\"}",
          "interval": "",
          "legendFormat": "",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          }
        }
      ],
      "title": "CPU Percent",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 7,
        "x": 6,
        "y": 2
      },
      "id": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "mem_used_percent{host=\"$host\",db=\"windows\"}",
          "interval": "",
          "legendFormat": "",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          }
        }
      ],
      "title": "Percent Memory",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 70
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 7,
        "x": 13,
        "y": 2
      },
      "id": 6,
      "options": {
        "displayMode": "lcd",
        "minVizHeight": 10,
        "minVizWidth": 0,
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "disk_used_percent{host=\"$host\",db=\"windows\"}",
          "interval": "",
          "legendFormat": "{{path}}",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          }
        }
      ],
      "title": "disk usage",
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${DS_SHIFT-LOGS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 20,
        "y": 8
      },
      "id": 16,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 0,
        "showHeader": false
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "${DS_SHIFT-LOGS}"
          },
          "expr": "{host=\"$host\",__name=\"exec_win_ver\"}| logfmt",
          "hide": false,
          "instant": false,
          "range": true,
          "refId": "A"
        }
      ],
      "title": "OS Version",
      "transformations": [
        {
          "id": "extractFields",
          "options": {
            "source": "labels"
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Caption": {
                "aggregations": [
                  "lastNotNull"
                ],
                "operation": "aggregate"
              },
              "Time ns": {
                "aggregations": [
                  "lastNotNull"
                ]
              },
              "Version": {
                "aggregations": [
                  "lastNotNull"
                ],
                "operation": "groupby"
              },
              "host": {
                "aggregations": []
              }
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Caption (lastNotNull)": false
            },
            "indexByName": {
              "Caption (lastNotNull)": 0,
              "Version": 1
            },
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "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": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "binBps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 10,
        "x": 0,
        "y": 9
      },
      "id": 8,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "mean",
            "sum"
          ],
          "displayMode": "table",
          "placement": "right",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "8.0.5",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          },
          "exemplar": true,
          "expr": "deriv(net_bytes_recv{host=\"$host\",db=\"windows\"})",
          "interval": "",
          "legendFormat": "{{interface}}",
          "refId": "A"
        }
      ],
      "title": "Mbytes/sec received",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "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": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "binBps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 10,
        "x": 10,
        "y": 9
      },
      "id": 10,
      "options": {
        "legend": {
          "calcs": [
            "max",
            "mean",
            "sum"
          ],
          "displayMode": "table",
          "placement": "right",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "8.0.5",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          },
          "exemplar": true,
          "expr": "deriv(net_bytes_sent{host=\"$host\",db=\"windows\"})",
          "interval": "",
          "legendFormat": "{{interface}}",
          "refId": "A"
        }
      ],
      "title": "mbytes/sec sent",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 20,
        "y": 13
      },
      "id": 27,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 7,
        "showHeader": false
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "win_services_state{db=\"windows\",host=\"$host\"} == 3",
          "interval": "",
          "legendFormat": "",
          "refId": "A",
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          }
        }
      ],
      "title": "Failed Services",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "reduceFields",
            "reducers": [
              "lastNotNull"
            ]
          }
        },
        {
          "id": "labelsToFields",
          "options": {}
        },
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Value": true,
              "active": true,
              "active_code": true,
              "db": true,
              "eren": true,
              "erwin": true,
              "host": true,
              "id": true,
              "load": true,
              "load_code": true,
              "sasha.local.mathiasp.me": true,
              "sub": true,
              "sub_code": true
            },
            "indexByName": {
              "active": 1,
              "active_code": 3,
              "id": 8,
              "load": 4,
              "load_code": 5,
              "name": 0,
              "sasha.local.mathiasp.me": 7,
              "sub": 6,
              "sub_code": 2
            },
            "renameByName": {}
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "field": "display_name"
              }
            ]
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "State"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "1": {
                        "index": 0,
                        "text": "stopped"
                      },
                      "2": {
                        "index": 1,
                        "text": "start pending"
                      },
                      "3": {
                        "index": 2,
                        "text": "stop pending"
                      },
                      "4": {
                        "index": 3,
                        "text": "running"
                      },
                      "5": {
                        "index": 4,
                        "text": "continue pending"
                      },
                      "6": {
                        "index": 5,
                        "text": "pause pending"
                      },
                      "7": {
                        "index": 6,
                        "text": "paused"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Startup"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "index": 0,
                        "text": "boot start"
                      },
                      "1": {
                        "index": 1,
                        "text": "system start"
                      },
                      "2": {
                        "index": 2,
                        "text": "auto start"
                      },
                      "3": {
                        "index": 3,
                        "text": "demand start"
                      },
                      "4": {
                        "index": 4,
                        "text": "disabled"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 10,
        "x": 0,
        "y": 16
      },
      "id": 29,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          },
          "exemplar": true,
          "expr": "win_services_state{db=\"windows\",host=\"$host\"}",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "windows services",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "reduceFields",
            "reducers": [
              "lastNotNull"
            ]
          }
        },
        {
          "id": "labelsToFields",
          "options": {}
        },
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Value": {
                "aggregations": [
                  "lastNotNull"
                ],
                "operation": "aggregate"
              },
              "display_name": {
                "aggregations": [
                  "lastNotNull"
                ],
                "operation": "aggregate"
              },
              "renier": {
                "aggregations": [
                  "lastNotNull"
                ]
              },
              "service_name": {
                "aggregations": [],
                "operation": "groupby"
              },
              "startup_mode": {
                "aggregations": [
                  "lastNotNull"
                ],
                "operation": "aggregate"
              },
              "state": {
                "aggregations": [
                  "lastNotNull"
                ],
                "operation": "aggregate"
              }
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Carter-AIO": true,
              "ESCANOR-WIN10": true,
              "id": true
            },
            "indexByName": {
              "ESCANOR-WIN10": 4,
              "display_name": 1,
              "id": 5,
              "service_name": 0,
              "startup_mode": 3,
              "state": 2
            },
            "renameByName": {
              "Value (lastNotNull)": "State",
              "display_name (lastNotNull)": "Display Name",
              "service_name": "Service",
              "startup_mode (lastNotNull)": "Startup",
              "state (lastNotNull)": "State"
            }
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "field": "Service"
              }
            ]
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "${DS_SHIFT-LOGS}"
      },
      "gridPos": {
        "h": 8,
        "w": 10,
        "x": 10,
        "y": 16
      },
      "id": 31,
      "options": {
        "dedupStrategy": "none",
        "enableLogDetails": true,
        "prettifyLogMessage": false,
        "showCommonLabels": false,
        "showLabels": false,
        "showTime": true,
        "sortOrder": "Descending",
        "wrapLogMessage": false
      },
      "pluginVersion": "8.1.0",
      "targets": [
        {
          "expr": "{Channel=~\"Microsoft-Windows-Windows Defender.*\",host=\"$host\"} | logfmt",
          "refId": "A",
          "datasource": {
            "type": "loki",
            "uid": "${DS_SHIFT-LOGS}"
          }
        }
      ],
      "title": "Defender logs",
      "transformations": [],
      "type": "logs"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_SHIFT-METRICS}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 4,
        "x": 20,
        "y": 18
      },
      "id": 33,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true
      },
      "pluginVersion": "9.3.6",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_SHIFT-METRICS}"
          },
          "editorMode": "code",
          "exemplar": true,
          "expr": "increase(diskio_read_bytes{host=\"$host\",db=\"windows\"} + diskio_read_bytes{host=\"$host\",db=\"windows\"})",
          "interval": "",
          "legendFormat": "{{name}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Total Disk IO",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "reducers": [
              "lastNotNull"
            ]
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "",
  "schemaVersion": 37,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "shift-metrics",
          "value": "shift-metrics"
        },
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "metrics",
        "options": [],
        "query": "prometheus",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {
          "selected": false,
          "text": "shift-logs",
          "value": "shift-logs"
        },
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "logs",
        "options": [],
        "query": "loki",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_SHIFT-METRICS}"
        },
        "definition": "label_values(cpu_usage_idle{db=\"windows\"},host)",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "host",
        "options": [],
        "query": {
          "query": "label_values(cpu_usage_idle{db=\"windows\"},host)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Windows Metrics",
  "uid": "LqfSpKn7y",
  "version": 4,
  "weekStart": "",
  "gnetId": 18162,
  "description": "Uses Telegraf, Victoriametrics, and Loki to display metrics and logs from a windows systems used by shift-mon"
}