{
  "uid": "windows-servers",
  "title": "Windows Servers – DC & SCCM",
  "tags": [
    "windows",
    "homelab"
  ],
  "timezone": "browser",
  "editable": true,
  "graphTooltip": 1,
  "refresh": "1m",
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "schemaVersion": 39,
  "version": 2,
  "links": [
    {
      "title": "All dashboards",
      "type": "dashboards",
      "asDropdown": true,
      "includeVars": false,
      "keepTime": true,
      "tags": [],
      "targetBlank": false,
      "icon": "external link"
    }
  ],
  "templating": {
    "list": []
  },
  "annotations": {
    "list": []
  },
  "panels": [
    {
      "id": 1,
      "type": "row",
      "title": "🚦 Status",
      "collapsed": false,
      "gridPos": {
        "x": 0,
        "y": 0,
        "w": 24,
        "h": 1
      },
      "panels": []
    },
    {
      "id": 2,
      "type": "stat",
      "title": "Servers",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 1,
        "w": 6,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "up{job=\"windows\"}",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "green",
                "value": 1
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "type": "value",
              "options": {
                "0": {
                  "text": "Offline",
                  "color": "red"
                },
                "1": {
                  "text": "Online",
                  "color": "green"
                }
              }
            }
          ]
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value_and_name",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 3,
      "type": "stat",
      "title": "Uptime",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 6,
        "y": 1,
        "w": 6,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "time() - windows_system_boot_time_timestamp",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "dtdurations",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "none",
        "graphMode": "none",
        "textMode": "value_and_name",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 4,
      "type": "stat",
      "title": "Clock offset (W32Time)",
      "description": "Difference to the time source. Kerberos fails above 5 minutes; alert above 60 s.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 1,
        "w": 6,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "abs(windows_time_computed_time_offset_seconds)",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "s",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 1
              },
              {
                "color": "red",
                "value": 60
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value_and_name",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 5,
      "type": "stat",
      "title": "Stopped critical services",
      "description": "Watched services with start type Automatic that are not running.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 18,
        "y": 1,
        "w": 6,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum((windows_service_state{state=\"running\"} == bool 0) and on(instance, name) (windows_service_start_mode{start_mode=\"auto\"} == 1)) or vector(0)",
          "legendFormat": "Stopped",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 6,
      "type": "stat",
      "title": "Critical services",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 6,
        "w": 24,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "windows_service_state{state=\"running\"}",
          "legendFormat": "{{host}} · {{name}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "green",
                "value": 1
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "type": "value",
              "options": {
                "0": {
                  "text": "STOPPED",
                  "color": "red"
                },
                "1": {
                  "text": "Running",
                  "color": "green"
                }
              }
            }
          ]
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value_and_name",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true,
        "text": {
          "titleSize": 10,
          "valueSize": 16
        }
      }
    },
    {
      "id": 7,
      "type": "row",
      "title": "🖥️ Resources",
      "collapsed": false,
      "gridPos": {
        "x": 0,
        "y": 11,
        "w": 24,
        "h": 1
      },
      "panels": []
    },
    {
      "id": 8,
      "type": "bargauge",
      "title": "CPU",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 12,
        "w": 8,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "100 - avg by (host) (rate(windows_cpu_time_total{mode=\"idle\"}[5m])) * 100",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 70
              },
              {
                "color": "red",
                "value": 90
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "min": 0,
          "max": 100
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "horizontal",
        "displayMode": "gradient",
        "showUnfilled": true,
        "valueMode": "color",
        "namePlacement": "left",
        "sizing": "auto"
      }
    },
    {
      "id": 9,
      "type": "bargauge",
      "title": "RAM",
      "description": "On CM01, SQL Server deliberately keeps a lot of RAM (up to its max server memory). High values there are normal.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 8,
        "y": 12,
        "w": 8,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "100 * (1 - windows_memory_available_bytes / windows_memory_physical_total_bytes)",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 85
              },
              {
                "color": "red",
                "value": 95
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "min": 0,
          "max": 100
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "horizontal",
        "displayMode": "gradient",
        "showUnfilled": true,
        "valueMode": "color",
        "namePlacement": "left",
        "sizing": "auto"
      }
    },
    {
      "id": 10,
      "type": "bargauge",
      "title": "Disks",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 16,
        "y": 12,
        "w": 8,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "100 * (1 - windows_logical_disk_free_bytes{volume=~\"[A-Z]:\"} / windows_logical_disk_size_bytes{volume=~\"[A-Z]:\"})",
          "legendFormat": "{{host}} {{volume}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 75
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "min": 0,
          "max": 100
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "orientation": "horizontal",
        "displayMode": "gradient",
        "showUnfilled": true,
        "valueMode": "color",
        "namePlacement": "left",
        "sizing": "auto"
      }
    },
    {
      "id": 11,
      "type": "timeseries",
      "title": "CPU %",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 17,
        "w": 8,
        "h": 7
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "100 - avg by (host) (rate(windows_cpu_time_total{mode=\"idle\"}[5m])) * 100",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": true,
          "instant": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            }
          },
          "min": 0
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 12,
      "type": "timeseries",
      "title": "RAM %",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 8,
        "y": 17,
        "w": 8,
        "h": 7
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "100 * (1 - windows_memory_available_bytes / windows_memory_physical_total_bytes)",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": true,
          "instant": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            }
          },
          "min": 0
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 13,
      "type": "timeseries",
      "title": "Network (in + out)",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 16,
        "y": 17,
        "w": 8,
        "h": 7
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host) (rate(windows_net_bytes_total[5m])) * 8",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": true,
          "instant": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "bps",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            }
          },
          "min": 0
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 14,
      "type": "timeseries",
      "title": "Disk latency (avg per I/O)",
      "description": "Below 10 ms is good, above 25 ms the disk is a bottleneck.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 24,
        "w": 12,
        "h": 7
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host, volume) (rate(windows_logical_disk_read_latency_seconds_total{volume=~\"[A-Z]:\"}[5m]) + rate(windows_logical_disk_write_latency_seconds_total{volume=~\"[A-Z]:\"}[5m])) / sum by (host, volume) (rate(windows_logical_disk_reads_total{volume=~\"[A-Z]:\"}[5m]) + rate(windows_logical_disk_writes_total{volume=~\"[A-Z]:\"}[5m]))",
          "legendFormat": "{{host}} {{volume}}",
          "refId": "A",
          "range": true,
          "instant": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "s",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            }
          },
          "min": 0
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 15,
      "type": "timeseries",
      "title": "Disk throughput",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 24,
        "w": 12,
        "h": 7
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host) (rate(windows_logical_disk_read_bytes_total{volume=~\"[A-Z]:\"}[5m]))",
          "legendFormat": "{{host}} read",
          "refId": "A",
          "range": true,
          "instant": false
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host) (rate(windows_logical_disk_write_bytes_total{volume=~\"[A-Z]:\"}[5m]))",
          "legendFormat": "{{host}} write",
          "refId": "B",
          "range": true,
          "instant": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "Bps",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            }
          },
          "min": 0
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 16,
      "type": "row",
      "title": "🏛️ Active Directory & DNS (DC1)",
      "collapsed": false,
      "gridPos": {
        "x": 0,
        "y": 31,
        "w": 24,
        "h": 1
      },
      "panels": []
    },
    {
      "id": 17,
      "type": "stat",
      "title": "LDAP client sessions",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 32,
        "w": 4,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host) (windows_ad_ldap_client_sessions)",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 18,
      "type": "stat",
      "title": "Replication pending",
      "description": "Pending AD replication syncs. Becomes meaningful once DC2 exists; should stay 0.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 4,
        "y": 32,
        "w": 4,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host) (windows_ad_replication_pending_synchronizations)",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 1
              },
              {
                "color": "red",
                "value": 10
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 19,
      "type": "stat",
      "title": "Directory request latency",
      "description": "Average time AD needs to answer a request. 0–10 ms is normal for a small domain.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 8,
        "y": 32,
        "w": 4,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "avg by (host) (windows_ad_atq_average_request_latency)",
          "legendFormat": "{{host}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 100
              },
              {
                "color": "red",
                "value": 500
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "decimals": 1
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 20,
      "type": "timeseries",
      "title": "LDAP searches & binds / s",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 32,
        "w": 12,
        "h": 10
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host) (rate(windows_ad_ldap_searches_total[5m]))",
          "legendFormat": "LDAP searches",
          "refId": "A",
          "range": true,
          "instant": false
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host) (rate(windows_ad_binds_total[5m]))",
          "legendFormat": "Binds (logons)",
          "refId": "B",
          "range": true,
          "instant": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ops",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            }
          },
          "min": 0
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 21,
      "type": "timeseries",
      "title": "DNS queries / s",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 37,
        "w": 12,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host) (rate(windows_dns_queries_total[5m]))",
          "legendFormat": "Queries",
          "refId": "A",
          "range": true,
          "instant": false
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host) (rate(windows_dns_recursive_queries_total[5m]))",
          "legendFormat": "Recursive (forwarded)",
          "refId": "B",
          "range": true,
          "instant": false
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (host) (rate(windows_dns_recursive_query_failures_total[5m]))",
          "legendFormat": "Recursive failures",
          "refId": "C",
          "range": true,
          "instant": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ops",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            }
          },
          "min": 0
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Recursive failures"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "mode": "fixed",
                  "fixedColor": "red"
                }
              }
            ]
          }
        ]
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 22,
      "type": "row",
      "title": "📦 SCCM / SQL Server (CM01)",
      "collapsed": false,
      "gridPos": {
        "x": 0,
        "y": 42,
        "w": 24,
        "h": 1
      },
      "panels": []
    },
    {
      "id": 23,
      "type": "stat",
      "title": "SQL user connections",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 43,
        "w": 4,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(windows_mssql_genstats_user_connections)",
          "legendFormat": "Connections",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 24,
      "type": "stat",
      "title": "Page life expectancy",
      "description": "How long data stays in SQL's RAM cache. Below 300 s = SQL needs more memory.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 4,
        "y": 43,
        "w": 4,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "min(windows_mssql_bufman_page_life_expectancy_seconds)",
          "legendFormat": "PLE",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "s",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "orange",
                "value": 300
              },
              {
                "color": "green",
                "value": 1000
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 25,
      "type": "stat",
      "title": "CM database log used",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 8,
        "y": 43,
        "w": 4,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "max by (database) (windows_mssql_databases_log_used_percent{database=~\"CM_.*\"})",
          "legendFormat": "{{database}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 70
              },
              {
                "color": "red",
                "value": 90
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value_and_name",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 26,
      "type": "stat",
      "title": "IIS connections",
      "description": "SCCM management point, distribution point and WSUS run on IIS.",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 12,
        "y": 43,
        "w": 4,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(windows_iis_current_connections)",
          "legendFormat": "IIS",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 27,
      "type": "stat",
      "title": "Deadlocks (1 h)",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 16,
        "y": 43,
        "w": 4,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(increase(windows_mssql_locks_deadlocks[1h]))",
          "legendFormat": "Deadlocks",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "none",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 1
              },
              {
                "color": "red",
                "value": 5
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "decimals": 0
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 28,
      "type": "stat",
      "title": "CM database size",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 20,
        "y": 43,
        "w": 4,
        "h": 5
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum by (database) (windows_mssql_databases_data_files_size_bytes{database=~\"CM_.*\"})",
          "legendFormat": "{{database}}",
          "refId": "A",
          "range": false,
          "instant": true
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "bytes",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "color": {
            "mode": "thresholds"
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "colorMode": "background",
        "graphMode": "none",
        "textMode": "value",
        "justifyMode": "center",
        "orientation": "auto",
        "wideLayout": true
      }
    },
    {
      "id": 29,
      "type": "timeseries",
      "title": "SQL batch requests / s",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 0,
        "y": 48,
        "w": 8,
        "h": 7
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(rate(windows_mssql_sqlstats_batch_requests[5m]))",
          "legendFormat": "Batches/s",
          "refId": "A",
          "range": true,
          "instant": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ops",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            }
          },
          "min": 0
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 30,
      "type": "timeseries",
      "title": "SQL memory",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 8,
        "y": 48,
        "w": 8,
        "h": 7
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(windows_mssql_memmgr_total_server_memory_bytes)",
          "legendFormat": "In use",
          "refId": "A",
          "range": true,
          "instant": false
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(windows_mssql_memmgr_target_server_memory_bytes)",
          "legendFormat": "Target",
          "refId": "B",
          "range": true,
          "instant": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "bytes",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            }
          },
          "min": 0
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    },
    {
      "id": 31,
      "type": "timeseries",
      "title": "IIS requests / s",
      "description": "",
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "x": 16,
        "y": 48,
        "w": 8,
        "h": 7
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "expr": "sum(rate(windows_iis_requests_total[5m]))",
          "legendFormat": "Requests/s",
          "refId": "A",
          "range": true,
          "instant": false
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "reqps",
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "drawStyle": "line",
            "lineWidth": 2,
            "fillOpacity": 10,
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "mode": "none",
              "group": "A"
            }
          },
          "min": 0
        },
        "overrides": []
      },
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "calcs": [
            "lastNotNull",
            "min",
            "max"
          ]
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      }
    }
  ]
}