Files
windows_exporter/dashboard/windows-exporter-services.json
T

944 lines
42 KiB
JSON

{
"apiVersion": "dashboard.grafana.app/v2",
"kind": "Dashboard",
"metadata": {
"name": "windows-exporter-services"
},
"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": "Service states and automatic services that are not running on one Windows host.",
"editable": true,
"elements": {
"panel-50": {
"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": "sum(windows_service_state{job=~\"$job\", instance=\"$instance\", state=\"running\"})",
"instant": false,
"legendFormat": "__auto",
"range": true
},
"version": "v0"
},
"refId": "A"
}
}
],
"queryOptions": {
"maxDataPoints": 100
},
"transformations": []
}
},
"description": "Number of services currently in the running state, reported by the service collector. Compare unexpected drops with the stopped automatic services table and service change history.",
"id": 50,
"links": [],
"title": "Running services",
"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-51": {
"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_service_state{job=~\"$job\", instance=\"$instance\", state=\"running\"} == 0 and on (service) windows_service_start_mode{job=~\"$job\", instance=\"$instance\", start_mode=\"auto\"} == 1) or vector(0)",
"instant": false,
"legendFormat": "__auto",
"range": true
},
"version": "v0"
},
"refId": "A"
}
}
],
"queryOptions": {
"maxDataPoints": 100
},
"transformations": []
}
},
"description": "Services with start mode \"auto\" that are not running.",
"id": 51,
"links": [],
"title": "Stopped auto services",
"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-52": {
"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": "sum(windows_service_state{job=~\"$job\", instance=\"$instance\", state=~\".* pending\"}) or vector(0)",
"instant": false,
"legendFormat": "__auto",
"range": true
},
"version": "v0"
},
"refId": "A"
}
}
],
"queryOptions": {
"maxDataPoints": 100
},
"transformations": []
}
},
"description": "Services in a start, stop, pause or continue pending state. A service that stays pending is hung.",
"id": 52,
"links": [],
"title": "Pending services",
"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-53": {
"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": "sum(windows_service_start_mode{job=~\"$job\", instance=\"$instance\", start_mode=\"disabled\"})",
"instant": false,
"legendFormat": "__auto",
"range": true
},
"version": "v0"
},
"refId": "A"
}
}
],
"queryOptions": {
"maxDataPoints": 100
},
"transformations": []
}
},
"description": "Number of services configured with disabled startup. A disabled service cannot start until its startup mode changes; disabled services are not necessarily unhealthy.",
"id": 53,
"links": [],
"title": "Disabled services",
"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-54": {
"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 (service, state) (windows_service_state{job=~\"$job\", instance=\"$instance\"} == 1) and on (service) (windows_service_state{job=~\"$job\", instance=\"$instance\", state=\"running\"} == 0) and on (service) (windows_service_start_mode{job=~\"$job\", instance=\"$instance\", start_mode=\"auto\"} == 1)",
"format": "table",
"instant": true,
"legendFormat": "__auto",
"range": false
},
"version": "v0"
},
"refId": "A"
}
}
],
"queryOptions": {},
"transformations": [
{
"group": "organize",
"kind": "Transformation",
"spec": {
"options": {
"excludeByName": {
"Time": true,
"Time 1": true,
"Value": true
},
"includeByName": {},
"indexByName": {
"service": 0,
"state": 1
},
"renameByName": {
"service": "Service",
"state": "State"
}
}
}
}
]
}
},
"description": "Services configured to start automatically that are not in the running state. Delayed-start and trigger-start services may show up here until they start.",
"id": 54,
"links": [],
"title": "Automatic services not running",
"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": []
},
"options": {
"cellHeight": "sm",
"enablePagination": false,
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true,
"sortBy": [
{
"desc": false,
"displayName": "Service"
}
]
}
},
"version": ""
}
}
},
"panel-55": {
"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_service_state{job=~\"$job\", instance=\"$instance\", state=\"running\"} and on (service) (changes(windows_service_state{job=~\"$job\", instance=\"$instance\", state=\"running\"}[$__range] @ end()) > 0)",
"instant": false,
"legendFormat": "{{service}}",
"range": true
},
"version": "v0"
},
"refId": "A"
}
}
],
"queryOptions": {},
"transformations": []
}
},
"description": "Services that started or stopped in the selected time range.",
"id": 55,
"links": [],
"title": "Service state changes",
"vizConfig": {
"group": "state-timeline",
"kind": "VizConfig",
"spec": {
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"fillOpacity": 90,
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineWidth": 0,
"spanNulls": false
},
"mappings": [
{
"options": {
"0": {
"color": "red",
"index": 0,
"text": "not running"
},
"1": {
"color": "green",
"index": 1,
"text": "running"
}
},
"type": "value"
}
],
"max": 1,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"unit": "none"
},
"overrides": []
},
"options": {
"alignValue": "left",
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"mergeValues": false,
"rowHeight": 1,
"showValue": "never",
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
}
},
"version": ""
}
}
}
},
"layout": {
"kind": "RowsLayout",
"spec": {
"rows": [
{
"kind": "RowsLayoutRow",
"spec": {
"collapse": false,
"layout": {
"kind": "GridLayout",
"spec": {
"items": [
{
"kind": "GridLayoutItem",
"spec": {
"element": {
"kind": "ElementReference",
"name": "panel-50"
},
"height": 4,
"width": 6,
"x": 0,
"y": 0
}
},
{
"kind": "GridLayoutItem",
"spec": {
"element": {
"kind": "ElementReference",
"name": "panel-51"
},
"height": 4,
"width": 6,
"x": 6,
"y": 0
}
},
{
"kind": "GridLayoutItem",
"spec": {
"element": {
"kind": "ElementReference",
"name": "panel-52"
},
"height": 4,
"width": 6,
"x": 12,
"y": 0
}
},
{
"kind": "GridLayoutItem",
"spec": {
"element": {
"kind": "ElementReference",
"name": "panel-53"
},
"height": 4,
"width": 6,
"x": 18,
"y": 0
}
}
]
}
},
"title": "Summary"
}
},
{
"kind": "RowsLayoutRow",
"spec": {
"collapse": false,
"layout": {
"kind": "GridLayout",
"spec": {
"items": [
{
"kind": "GridLayoutItem",
"spec": {
"element": {
"kind": "ElementReference",
"name": "panel-54"
},
"height": 10,
"width": 12,
"x": 0,
"y": 0
}
},
{
"kind": "GridLayoutItem",
"spec": {
"element": {
"kind": "ElementReference",
"name": "panel-55"
},
"height": 10,
"width": 12,
"x": 12,
"y": 0
}
}
]
}
},
"title": "State"
}
}
]
}
},
"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 / Services",
"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"
}
}
]
}
}