Closed AlvinStefanus closed 3 years ago
I found the issue, the JSON still using wmi_
prefix, it is now changed to windows_
prefix. So import in Grafana using this JSON.
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "4.2.0"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": {
"list": []
},
"description": "General stats dashboard with node selector, uses metrics from windows_exporter",
"editable": true,
"gnetId": 2129,
"graphTooltip": 1,
"hideControls": false,
"id": null,
"links": [],
"refresh": "10s",
"rows": [
{
"collapse": false,
"height": 332,
"panels": [
{
"aliasColors": {
"idle": "#0A50A1"
},
"bars": false,
"datasource": "${DS_PROMETHEUS}",
"fill": 10,
"hideTimeOverride": false,
"id": 4,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 0,
"links": [],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 4,
"stack": true,
"steppedLine": false,
"targets": [
{
"application": {
"filter": ""
},
"expr": "sum by (mode) (rate(windows_cpu_time_total{instance=~\"$server\"}[5m]))",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "{{mode}}",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "A",
"step": 20
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "CPU load",
"tooltip": {
"shared": false,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROMETHEUS}",
"fill": 1,
"hideTimeOverride": false,
"id": 12,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 4,
"stack": false,
"steppedLine": false,
"targets": [
{
"application": {
"filter": ""
},
"expr": "windows_system_threads{instance=~\"$server\"}",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "system_threads",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "A",
"step": 20
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "system_threads",
"tooltip": {
"shared": false,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROMETHEUS}",
"fill": 1,
"hideTimeOverride": false,
"id": 13,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 4,
"stack": false,
"steppedLine": false,
"targets": [
{
"application": {
"filter": ""
},
"expr": "rate(windows_system_exception_dispatches_total{instance=~\"$server\"}[$interval])",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "exceptions",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "A",
"step": 20
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "System exception dispatches",
"tooltip": {
"shared": false,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Dashboard Row",
"titleSize": "h6"
},
{
"collapse": false,
"height": 251,
"panels": [
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROMETHEUS}",
"fill": 1,
"hideTimeOverride": false,
"id": 10,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 5,
"stack": false,
"steppedLine": false,
"targets": [
{
"application": {
"filter": ""
},
"expr": "irate(windows_net_packets_outbound_discarded{instance=~\"$server\", nic!~\"isatap.+\"}[$interval]) + irate(windows_net_packets_outbound_errors{instance=~\"$server\"}[$interval])",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "Sent {{nic}}",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "B",
"step": 15
},
{
"application": {
"filter": ""
},
"expr": "irate(windows_net_packets_received_discarded{instance=~\"$server\", nic!~\"isatap.+\"}[$interval]) + irate(windows_net_packets_received_errors{instance=~\"$server\"}[$interval])",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "Received {{nic}}",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "A",
"step": 15
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Network discarded/error packets",
"tooltip": {
"shared": false,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROMETHEUS}",
"fill": 1,
"hideTimeOverride": false,
"id": 11,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 7,
"stack": false,
"steppedLine": false,
"targets": [
{
"application": {
"filter": ""
},
"expr": "rate(windows_net_bytes_sent_total{instance=~\"$server\"}[$interval]) >0",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "Sent {{nic}}",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "B",
"step": 10
},
{
"application": {
"filter": ""
},
"expr": "- rate(windows_net_bytes_received_total{instance=~\"$server\"}[$interval]) <0",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "Received {{nic}}",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "A",
"step": 10
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Network",
"tooltip": {
"shared": false,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Dashboard Row",
"titleSize": "h6"
},
{
"collapse": false,
"height": 194,
"panels": [
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROMETHEUS}",
"fill": 2,
"hideTimeOverride": false,
"id": 8,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 4,
"stack": false,
"steppedLine": false,
"targets": [
{
"application": {
"filter": ""
},
"expr": "irate(windows_logical_disk_write_bytes_total{instance=~\"$server\", volume !~\"HarddiskVolume.+\"}[$interval])",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "Write {{volume}}",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "A",
"step": 20
},
{
"application": {
"filter": ""
},
"expr": "- irate(windows_logical_disk_read_bytes_total{instance=~\"$server\", volume !~\"HarddiskVolume.+\"}[$interval])",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "Read {{volume}}",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "B",
"step": 20
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Hard drive load",
"tooltip": {
"shared": false,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "decbytes",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROMETHEUS}",
"fill": 1,
"hideTimeOverride": false,
"id": 9,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 4,
"stack": false,
"steppedLine": false,
"targets": [
{
"application": {
"filter": ""
},
"expr": "rate(windows_logical_disk_split_ios_total{instance=~\"$server\", volume !~\"HarddiskVolume.+\"}[30s])",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "i/o {{volume}}",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "A",
"step": 20
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Hard disk i/o ops total",
"tooltip": {
"shared": false,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROMETHEUS}",
"fill": 1,
"hideTimeOverride": false,
"id": 15,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 4,
"stack": false,
"steppedLine": false,
"targets": [
{
"application": {
"filter": ""
},
"expr": "windows_logical_disk_free_bytes{instance=~\"$server\", volume !~\"HarddiskVolume.+\"}",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "free {{volume}}",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "A",
"step": 20
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Hard disk free space",
"tooltip": {
"shared": false,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "decbytes",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Dashboard Row",
"titleSize": "h6"
},
{
"collapse": false,
"height": 214,
"panels": [
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROMETHEUS}",
"fill": 1,
"hideTimeOverride": false,
"id": 14,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"application": {
"filter": ""
},
"expr": "windows_os_virtual_memory_bytes{instance=~\"$server\"}",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "Virtual memory",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "A",
"step": 5
},
{
"application": {
"filter": ""
},
"expr": "windows_cs_physical_memory_bytes{instance=~\"$server\"}",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "Physical memory",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "B",
"step": 5
},
{
"application": {
"filter": ""
},
"expr": "windows_os_physical_memory_free_bytes{instance=~\"$server\"}",
"functions": [],
"group": {
"filter": ""
},
"hide": false,
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "Free physical memory",
"metric": "mysql_global_status_questions",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "C",
"step": 5
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Memory",
"tooltip": {
"shared": false,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "decbytes",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Dashboard Row",
"titleSize": "h6"
},
{
"collapse": false,
"height": 218,
"panels": [
{
"aliasColors": {
"Received mysqld-exporter:9104": "#0A50A1",
"stopped": "#2F575E"
},
"bars": false,
"datasource": "${DS_PROMETHEUS}",
"fill": 10,
"id": 7,
"legend": {
"alignAsTable": true,
"avg": false,
"current": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 0,
"links": [],
"nullPointMode": "null as zero",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"span": 12,
"stack": true,
"steppedLine": false,
"targets": [
{
"application": {
"filter": ""
},
"expr": "sum(windows_service_state{instance=~\"$server\"}) by (state)",
"functions": [],
"group": {
"filter": ""
},
"host": {
"filter": ""
},
"intervalFactor": 1,
"item": {
"filter": ""
},
"legendFormat": "{{state}}",
"mode": 0,
"options": {
"showDisabledItems": false
},
"refId": "A",
"step": 5
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Services by state",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "Bps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": false,
"title": "Dashboard Row",
"titleSize": "h6"
}
],
"schemaVersion": 14,
"style": "dark",
"tags": [
"windows",
"windows_exporter",
"prometheus"
],
"templating": {
"list": [
{
"auto": false,
"auto_count": 500,
"auto_min": "30s",
"current": {
"text": "60s",
"value": "60s"
},
"hide": 2,
"label": "Interval",
"name": "interval",
"options": [
{
"selected": true,
"text": "60s",
"value": "60s"
}
],
"query": "60s",
"refresh": 2,
"type": "interval"
},
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"hide": 0,
"includeAll": false,
"label": "Server",
"multi": false,
"name": "server",
"options": [],
"query": "label_values(windows_system_system_up_time, instance)",
"refresh": 1,
"regex": "",
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-3h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "browser",
"title": "Windows Node",
"version": 1
}
Hi, from where did you get this grafana template? Thanks
So I am using Grafana to visualize the graph. I import 2129 for WMI. These are the query in Grafana which are resulting empty array.