{ "apiVersion": "dashboard.grafana.app/v2", "kind": "Dashboard", "metadata": { "name": "windows-exporter-updates" }, "spec": { "annotations": [ { "kind": "AnnotationQuery", "spec": { "builtIn": true, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "legacyOptions": { "type": "dashboard" }, "name": "Annotations & Alerts", "query": { "datasource": { "name": "-- Grafana --" }, "group": "grafana", "kind": "DataQuery", "spec": {}, "version": "v0" } } }, { "kind": "AnnotationQuery", "spec": { "enable": true, "hide": false, "iconColor": "orange", "legacyOptions": { "expr": "windows_system_boot_time_timestamp{job=~\"$job\", instance=\"$instance\"} * 1000 > $__from < $__to", "step": "1m", "tagKeys": "instance", "textFormat": "", "titleFormat": "Reboot", "useValueForTime": "on" }, "name": "Reboots", "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": {}, "version": "v0" } } } ], "cursorSync": "Crosshair", "description": "Pending Windows updates and the last update check of one Windows host.", "editable": true, "elements": { "panel-210": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "editorMode": "code", "expr": "count(windows_update_pending_info{job=~\"$job\", instance=\"$instance\"}) or (0 * count(windows_update_scrape_timestamp_seconds{job=~\"$job\", instance=\"$instance\"}))", "instant": false, "legendFormat": "__auto", "range": true }, "version": "v0" }, "refId": "A" } } ], "queryOptions": { "maxDataPoints": 100 }, "transformations": [] } }, "description": "Updates that are available but not installed, including optional updates. Requires the update collector, which is not enabled by default. The collector queries Windows Update in the background, every 6 hours by default.", "id": 210, "links": [], "title": "Pending", "vizConfig": { "group": "stat", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "fixedColor": "text", "mode": "fixed" }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] }, "unit": "short" }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true } }, "version": "" } } }, "panel-211": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "editorMode": "code", "expr": "count(windows_update_pending_info{job=~\"$job\", instance=\"$instance\", severity=\"Critical\"}) or (0 * count(windows_update_scrape_timestamp_seconds{job=~\"$job\", instance=\"$instance\"}))", "instant": false, "legendFormat": "__auto", "range": true }, "version": "v0" }, "refId": "A" } } ], "queryOptions": { "maxDataPoints": 100 }, "transformations": [] } }, "description": "Pending updates with the Microsoft security severity Critical. Requires the update collector, which is not enabled by default. The collector queries Windows Update in the background, every 6 hours by default.", "id": 211, "links": [], "title": "Critical", "vizConfig": { "group": "stat", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 1 } ] }, "unit": "short" }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true } }, "version": "" } } }, "panel-212": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "editorMode": "code", "expr": "count(windows_update_pending_info{job=~\"$job\", instance=\"$instance\", severity=\"Important\"}) or (0 * count(windows_update_scrape_timestamp_seconds{job=~\"$job\", instance=\"$instance\"}))", "instant": false, "legendFormat": "__auto", "range": true }, "version": "v0" }, "refId": "A" } } ], "queryOptions": { "maxDataPoints": 100 }, "transformations": [] } }, "description": "Pending updates with the Microsoft security severity Important. Requires the update collector, which is not enabled by default. The collector queries Windows Update in the background, every 6 hours by default.", "id": 212, "links": [], "title": "Important", "vizConfig": { "group": "stat", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 1 } ] }, "unit": "short" }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true } }, "version": "" } } }, "panel-213": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "editorMode": "code", "expr": "count(windows_update_pending_info{job=~\"$job\", instance=\"$instance\", deployment_action=\"optional_installation\"}) or (0 * count(windows_update_scrape_timestamp_seconds{job=~\"$job\", instance=\"$instance\"}))", "instant": false, "legendFormat": "__auto", "range": true }, "version": "v0" }, "refId": "A" } } ], "queryOptions": { "maxDataPoints": 100 }, "transformations": [] } }, "description": "Pending optional updates, such as the monthly non-security preview update. Windows does not install them automatically. Requires the update collector, which is not enabled by default. The collector queries Windows Update in the background, every 6 hours by default.", "id": 213, "links": [], "title": "Optional", "vizConfig": { "group": "stat", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "fixedColor": "text", "mode": "fixed" }, "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] }, "unit": "short" }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true } }, "version": "" } } }, "panel-214": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "editorMode": "code", "expr": "time() - min(windows_update_pending_published_timestamp{job=~\"$job\", instance=\"$instance\"} and on (id, revision) windows_update_pending_info{job=~\"$job\", instance=\"$instance\", deployment_action=\"installation\"})", "instant": false, "legendFormat": "__auto", "range": true }, "version": "v0" }, "refId": "A" } } ], "queryOptions": { "maxDataPoints": 100 }, "transformations": [] } }, "description": "Time since the oldest pending regular update was published. Optional updates are left out. Orange after 30 days, red after 60 days. Requires the update collector, which is not enabled by default. The collector queries Windows Update in the background, every 6 hours by default.", "id": 214, "links": [], "title": "Oldest pending", "vizConfig": { "group": "stat", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "noValue": "none", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 2592000 }, { "color": "red", "value": 5184000 } ] }, "unit": "dtdurations" }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "last" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true } }, "version": "" } } }, "panel-215": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "editorMode": "code", "expr": "time() - windows_update_scrape_timestamp_seconds{job=~\"$job\", instance=\"$instance\"}", "instant": false, "legendFormat": "__auto", "range": true }, "version": "v0" }, "refId": "A" } } ], "queryOptions": { "maxDataPoints": 100 }, "transformations": [] } }, "description": "Time since the collector last queried Windows Update. Orange after 1 day, red after 7 days. Requires the update collector, which is not enabled by default. The collector queries Windows Update in the background, every 6 hours by default.", "id": 215, "links": [], "title": "Last check", "vizConfig": { "group": "stat", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 86400 }, { "color": "red", "value": 604800 } ] }, "unit": "dtdurations" }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "last" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true } }, "version": "" } } }, "panel-216": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "editorMode": "code", "expr": "max by (title, category, severity, deployment_action) ((windows_update_pending_published_timestamp{job=~\"$job\", instance=\"$instance\"} * on (id, revision) group_right windows_update_pending_info{job=~\"$job\", instance=\"$instance\"}) or on (id, revision) (0 * windows_update_pending_info{job=~\"$job\", instance=\"$instance\"})) * 1000", "format": "table", "instant": true, "legendFormat": "__auto", "range": false }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [ { "group": "organize", "kind": "Transformation", "spec": { "options": { "excludeByName": { "Time": true }, "includeByName": {}, "indexByName": { "Value": 4, "category": 1, "deployment_action": 3, "severity": 2, "title": 0 }, "renameByName": { "Value": "Published", "category": "Category", "deployment_action": "Type", "severity": "Severity", "title": "Update" } } } } ] } }, "description": "Pending updates with their category, security severity, type and publish date. Optional updates, such as the monthly non-security preview update, are not installed automatically. Category names follow the Windows display language. Requires the update collector, which is not enabled by default. The collector queries Windows Update in the background, every 6 hours by default.", "id": 216, "links": [], "title": "Pending updates", "vizConfig": { "group": "table", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "filterable": false, "inspect": false, "minWidth": 60 }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Published" }, "properties": [ { "id": "unit", "value": "dateTimeFromNow" }, { "id": "mappings", "value": [ { "options": { "0": { "index": 0, "text": "unknown" } }, "type": "value" } ] } ] }, { "matcher": { "id": "byName", "options": "Severity" }, "properties": [ { "id": "color", "value": { "fixedColor": "text", "mode": "fixed" } }, { "id": "mappings", "value": [ { "options": { "Critical": { "color": "red", "index": 0 }, "Important": { "color": "orange", "index": 1 } }, "type": "value" } ] }, { "id": "custom.cellOptions", "value": { "type": "color-text" } } ] }, { "matcher": { "id": "byName", "options": "Type" }, "properties": [ { "id": "mappings", "value": [ { "options": { "installation": { "index": 0, "text": "Regular" }, "optional_installation": { "index": 1, "text": "Optional" } }, "type": "value" } ] } ] } ] }, "options": { "cellHeight": "sm", "enablePagination": false, "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true, "sortBy": [ { "desc": false, "displayName": "Published" } ] } }, "version": "" } } }, "panel-217": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "editorMode": "code", "expr": "count by (category) (windows_update_pending_info{job=~\"$job\", instance=\"$instance\"})", "instant": false, "legendFormat": "{{category}}", "range": true }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [] } }, "description": "Number of pending updates per update category. Requires the update collector, which is not enabled by default. The collector queries Windows Update in the background, every 6 hours by default.", "id": 217, "links": [], "title": "Pending updates by category", "vizConfig": { "group": "timeseries", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "bars", "fillOpacity": 80, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 4, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "short" }, "overrides": [] }, "options": { "legend": { "calcs": [ "mean", "max", "lastNotNull" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "multi", "sort": "desc" } } }, "version": "" } } }, "panel-218": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "editorMode": "code", "expr": "windows_update_scrape_query_duration_seconds{job=~\"$job\", instance=\"$instance\"}", "instant": false, "legendFormat": "query duration", "range": true }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [] } }, "description": "Duration of the last background query to the Windows Update API. Slow queries can point to a slow or unreachable update server. Requires the update collector, which is not enabled by default. The collector queries Windows Update in the background, every 6 hours by default.", "id": 218, "links": [], "title": "Windows Update query duration", "vizConfig": { "group": "timeseries", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 4, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "s" }, "overrides": [] }, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "multi", "sort": "desc" } } }, "version": "" } } } }, "layout": { "kind": "RowsLayout", "spec": { "rows": [ { "kind": "RowsLayoutRow", "spec": { "collapse": false, "layout": { "kind": "GridLayout", "spec": { "items": [ { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-210" }, "height": 4, "width": 4, "x": 0, "y": 0 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-211" }, "height": 4, "width": 4, "x": 4, "y": 0 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-212" }, "height": 4, "width": 4, "x": 8, "y": 0 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-213" }, "height": 4, "width": 4, "x": 12, "y": 0 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-214" }, "height": 4, "width": 4, "x": 16, "y": 0 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-215" }, "height": 4, "width": 4, "x": 20, "y": 0 } } ] } }, "title": "Summary" } }, { "kind": "RowsLayoutRow", "spec": { "collapse": false, "layout": { "kind": "GridLayout", "spec": { "items": [ { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-216" }, "height": 10, "width": 24, "x": 0, "y": 0 } } ] } }, "title": "Pending updates" } }, { "kind": "RowsLayoutRow", "spec": { "collapse": false, "layout": { "kind": "GridLayout", "spec": { "items": [ { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-217" }, "height": 8, "width": 12, "x": 0, "y": 0 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-218" }, "height": 8, "width": 12, "x": 12, "y": 0 } } ] } }, "title": "History" } } ] } }, "links": [ { "asDropdown": true, "icon": "external link", "includeVars": true, "keepTime": true, "tags": [ "prometheus", "windows", "windows_exporter" ], "targetBlank": false, "title": "Windows Exporter", "tooltip": "Dashboards for windows_exporter", "type": "dashboards", "url": "" }, { "asDropdown": false, "icon": "doc", "includeVars": false, "keepTime": false, "tags": [], "targetBlank": true, "title": "windows_exporter", "tooltip": "", "type": "link", "url": "https://github.com/prometheus-community/windows_exporter" } ], "liveNow": false, "preload": false, "tags": [ "prometheus", "windows", "windows_exporter" ], "timeSettings": { "autoRefresh": "1m", "autoRefreshIntervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "fiscalYearStartMonth": 0, "from": "now-3h", "hideTimepicker": false, "to": "now" }, "title": "Windows Exporter / Updates", "variables": [ { "kind": "DatasourceVariable", "spec": { "allowCustomValue": true, "current": { "text": "", "value": "" }, "hide": "dontHide", "includeAll": false, "label": "Data source", "multi": false, "name": "datasource", "options": [], "pluginId": "prometheus", "refresh": "onDashboardLoad", "regex": "", "skipUrlSync": false } }, { "kind": "QueryVariable", "spec": { "allowCustomValue": true, "current": { "text": [ "All" ], "value": [ "$__all" ] }, "definition": "label_values(windows_os_hostname, job)", "hide": "dontHide", "includeAll": true, "label": "Job", "multi": true, "name": "job", "options": [], "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "qryType": 1, "query": "label_values(windows_os_hostname, job)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "version": "v0" }, "refresh": "onTimeRangeChanged", "regex": "", "skipUrlSync": false, "sort": "alphabeticalAsc" } }, { "kind": "QueryVariable", "spec": { "allowCustomValue": true, "current": { "text": [ "All" ], "value": [ "$__all" ] }, "definition": "label_values(windows_os_hostname{job=~\"$job\"}, hostname)", "hide": "dontHide", "includeAll": true, "label": "Hostname", "multi": true, "name": "hostname", "options": [], "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "qryType": 1, "query": "label_values(windows_os_hostname{job=~\"$job\"}, hostname)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "version": "v0" }, "refresh": "onTimeRangeChanged", "regex": "", "skipUrlSync": false, "sort": "alphabeticalAsc" } }, { "kind": "QueryVariable", "spec": { "allowCustomValue": true, "current": { "text": "", "value": "" }, "definition": "label_values(windows_os_hostname{job=~\"$job\", hostname=~\"$hostname\"}, instance)", "hide": "dontHide", "includeAll": false, "label": "Instance", "multi": false, "name": "instance", "options": [], "query": { "datasource": { "name": "${datasource}" }, "group": "prometheus", "kind": "DataQuery", "spec": { "qryType": 1, "query": "label_values(windows_os_hostname{job=~\"$job\", hostname=~\"$hostname\"}, instance)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "version": "v0" }, "refresh": "onTimeRangeChanged", "regex": "", "skipUrlSync": false, "sort": "alphabeticalAsc" } } ] } }