Created
October 23, 2021 11:01
-
-
Save nidhinkumar06/df4129a8ab132aa7b3a51af187e31772 to your computer and use it in GitHub Desktop.
Grafana system metric dashboard using InfluxDB2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", | |
"target": { | |
"limit": 100, | |
"matchAny": false, | |
"tags": [], | |
"type": "dashboard" | |
}, | |
"type": "dashboard" | |
} | |
] | |
}, | |
"editable": true, | |
"fiscalYearStartMonth": 0, | |
"gnetId": null, | |
"graphTooltip": 0, | |
"id": 5, | |
"iteration": 1634985289582, | |
"links": [], | |
"liveNow": false, | |
"panels": [ | |
{ | |
"datasource": "InfluxDB-Localhost", | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
}, | |
"unit": "d" | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 3, | |
"w": 8, | |
"x": 0, | |
"y": 0 | |
}, | |
"id": 9, | |
"options": { | |
"colorMode": "value", | |
"graphMode": "none", | |
"justifyMode": "auto", | |
"orientation": "auto", | |
"reduceOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"fields": "", | |
"values": false | |
}, | |
"text": {}, | |
"textMode": "auto" | |
}, | |
"pluginVersion": "8.2.0", | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"system\")\n |> filter(fn: (r) => r._field == \"uptime\")\n |> last()\n |> map(fn: (r) => ({r with _value: r._value / 86400}))\n |> yield(name: \"last\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "System uptime", | |
"type": "stat" | |
}, | |
{ | |
"datasource": null, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"decimals": 2, | |
"mappings": [], | |
"max": 100, | |
"min": 0, | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
}, | |
"unit": "percent" | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 3, | |
"w": 8, | |
"x": 8, | |
"y": 0 | |
}, | |
"id": 11, | |
"options": { | |
"colorMode": "value", | |
"graphMode": "none", | |
"justifyMode": "auto", | |
"orientation": "auto", | |
"reduceOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"fields": "", | |
"values": false | |
}, | |
"text": {}, | |
"textMode": "auto" | |
}, | |
"pluginVersion": "8.2.0", | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"system\")\n |> filter(fn: (r) => r._field == \"load1\")\n |> last()\n |> yield(name: \"mean\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "System load", | |
"type": "stat" | |
}, | |
{ | |
"datasource": null, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
}, | |
"unit": "cpus" | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 3, | |
"w": 8, | |
"x": 16, | |
"y": 0 | |
}, | |
"id": 10, | |
"options": { | |
"colorMode": "value", | |
"graphMode": "none", | |
"justifyMode": "auto", | |
"orientation": "auto", | |
"reduceOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"fields": "", | |
"values": false | |
}, | |
"text": {}, | |
"textMode": "auto" | |
}, | |
"pluginVersion": "8.2.0", | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"system\")\n |> filter(fn: (r) => r._field == \"n_cpus\")\n |> last()\n |> yield(name: \"last\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "nCPUs", | |
"type": "stat" | |
}, | |
{ | |
"datasource": null, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"decimals": 2, | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
} | |
] | |
}, | |
"unit": "decbytes" | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 3, | |
"w": 8, | |
"x": 0, | |
"y": 3 | |
}, | |
"id": 12, | |
"options": { | |
"colorMode": "value", | |
"graphMode": "none", | |
"justifyMode": "auto", | |
"orientation": "auto", | |
"reduceOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"fields": "", | |
"values": false | |
}, | |
"text": {}, | |
"textMode": "auto" | |
}, | |
"pluginVersion": "8.2.0", | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"mem\")\n |> filter(fn: (r) => r._field == \"total\")\n |> last()\n |> yield(name: \"last\")\n ", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "RAM", | |
"type": "stat" | |
}, | |
{ | |
"datasource": null, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"decimals": 2, | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
} | |
] | |
}, | |
"unit": "decbytes" | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 3, | |
"w": 8, | |
"x": 8, | |
"y": 3 | |
}, | |
"id": 14, | |
"options": { | |
"colorMode": "value", | |
"graphMode": "none", | |
"justifyMode": "auto", | |
"orientation": "auto", | |
"reduceOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"fields": "", | |
"values": false | |
}, | |
"text": {}, | |
"textMode": "auto" | |
}, | |
"pluginVersion": "8.2.0", | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "FinalOutput = [\"_field\", \"_time\", \"_value\"]\n\nRawSeries = from(bucket: v.defaultBucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_measurement\"] == \"disk\")\n |> filter(fn: (r) => r[\"_field\"] == \"total\")\n |> filter(fn: (r) => r[\"mode\"] == \"rw\" and r[\"path\"] == \"/\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n\nNamedSeries = RawSeries\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field: \"Disk Space\"}))\n |> keep(columns:FinalOutput)\n |> yield()", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "Disk", | |
"type": "stat" | |
}, | |
{ | |
"datasource": null, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"decimals": 2, | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
} | |
] | |
}, | |
"unit": "decbytes" | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 3, | |
"w": 8, | |
"x": 16, | |
"y": 3 | |
}, | |
"id": 13, | |
"options": { | |
"colorMode": "value", | |
"graphMode": "none", | |
"justifyMode": "auto", | |
"orientation": "auto", | |
"reduceOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"fields": "", | |
"values": false | |
}, | |
"text": {}, | |
"textMode": "auto" | |
}, | |
"pluginVersion": "8.2.0", | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "FinalOutput = [\"_field\", \"_time\", \"_value\"]\n\nRawSeries = from(bucket: v.defaultBucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_measurement\"] == \"disk\")\n |> filter(fn: (r) => r[\"mode\"] == \"rw\" and r[\"path\"] == \"/\")\n |> filter(fn: (r) => r._field == \"free\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n\nNamedSeries = RawSeries\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field: \"Disk Space\"}))\n |> keep(columns:FinalOutput)\n |> yield()", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "Remaining Disk Space", | |
"transformations": [ | |
{ | |
"id": "reduce", | |
"options": { | |
"reducers": [] | |
} | |
} | |
], | |
"type": "stat" | |
}, | |
{ | |
"collapsed": false, | |
"datasource": null, | |
"gridPos": { | |
"h": 1, | |
"w": 24, | |
"x": 0, | |
"y": 6 | |
}, | |
"id": 2, | |
"panels": [], | |
"repeat": null, | |
"title": "CPU", | |
"type": "row" | |
}, | |
{ | |
"datasource": null, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"mappings": [], | |
"max": 100, | |
"min": 0, | |
"thresholds": { | |
"mode": "percentage", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "#EAB839", | |
"value": 75 | |
}, | |
{ | |
"color": "red", | |
"value": 90 | |
} | |
] | |
}, | |
"unit": "percent" | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 9, | |
"w": 6, | |
"x": 0, | |
"y": 7 | |
}, | |
"id": 4, | |
"options": { | |
"orientation": "auto", | |
"reduceOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"fields": "", | |
"values": false | |
}, | |
"showThresholdLabels": false, | |
"showThresholdMarkers": true, | |
"text": {} | |
}, | |
"pluginVersion": "8.2.0", | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"cpu\")\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_field\"] == \"usage_system\")\n |> filter(fn: (r) => r.cpu == \"cpu-total\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "CPU-System Usage", | |
"type": "gauge" | |
}, | |
{ | |
"aliasColors": {}, | |
"bars": false, | |
"dashLength": 10, | |
"dashes": false, | |
"datasource": null, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"unit": "percent" | |
}, | |
"overrides": [] | |
}, | |
"fill": 1, | |
"fillGradient": 0, | |
"gridPos": { | |
"h": 9, | |
"w": 18, | |
"x": 6, | |
"y": 7 | |
}, | |
"hiddenSeries": false, | |
"id": 6, | |
"legend": { | |
"alignAsTable": true, | |
"avg": true, | |
"current": true, | |
"max": true, | |
"min": true, | |
"rightSide": false, | |
"show": true, | |
"sort": "min", | |
"sortDesc": false, | |
"total": false, | |
"values": true | |
}, | |
"lines": true, | |
"linewidth": 1, | |
"nullPointMode": "null", | |
"options": { | |
"alertThreshold": true | |
}, | |
"percentage": false, | |
"pluginVersion": "8.2.0", | |
"pointradius": 1, | |
"points": true, | |
"renderer": "flot", | |
"seriesOverrides": [ | |
{ | |
"alias": "usage_idle cpu-total", | |
"yaxis": 1 | |
} | |
], | |
"spaceLength": 10, | |
"stack": false, | |
"steppedLine": false, | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"cpu\")\n |> filter(fn: (r) => r._field == \"usage_user\")\n |> filter(fn: (r) => r.cpu == \"cpu-total\")\n |> drop(columns: [\"host\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
}, | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"cpu\")\n |> filter(fn: (r) => r._field == \"usage_system\")\n |> filter(fn: (r) => r.cpu == \"cpu-total\")\n |> drop(columns: [\"host\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", | |
"refId": "B", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
}, | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"cpu\")\n |> filter(fn: (r) => r._field == \"usage_idle\")\n |> filter(fn: (r) => r.cpu == \"cpu-total\")\n |> drop(columns: [\"host\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", | |
"refId": "C", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"thresholds": [], | |
"timeFrom": null, | |
"timeRegions": [], | |
"timeShift": null, | |
"title": "CPU Usage", | |
"tooltip": { | |
"shared": true, | |
"sort": 0, | |
"value_type": "individual" | |
}, | |
"type": "graph", | |
"xaxis": { | |
"buckets": null, | |
"mode": "time", | |
"name": null, | |
"show": true, | |
"values": [] | |
}, | |
"yaxes": [ | |
{ | |
"format": "percent", | |
"label": null, | |
"logBase": 1, | |
"max": null, | |
"min": null, | |
"show": true | |
}, | |
{ | |
"format": "short", | |
"label": null, | |
"logBase": 1, | |
"max": null, | |
"min": null, | |
"show": true | |
} | |
], | |
"yaxis": { | |
"align": false, | |
"alignLevel": null | |
} | |
}, | |
{ | |
"collapsed": false, | |
"datasource": null, | |
"gridPos": { | |
"h": 1, | |
"w": 24, | |
"x": 0, | |
"y": 16 | |
}, | |
"id": 16, | |
"panels": [], | |
"repeat": null, | |
"title": "Disk Usage", | |
"type": "row" | |
}, | |
{ | |
"datasource": null, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"mappings": [], | |
"max": 100, | |
"min": 0, | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "#EAB839", | |
"value": 75 | |
}, | |
{ | |
"color": "red", | |
"value": 90 | |
} | |
] | |
}, | |
"unit": "percent" | |
}, | |
"overrides": [] | |
}, | |
"gridPos": { | |
"h": 9, | |
"w": 6, | |
"x": 0, | |
"y": 17 | |
}, | |
"id": 18, | |
"options": { | |
"orientation": "horizontal", | |
"reduceOptions": { | |
"calcs": [ | |
"mean" | |
], | |
"fields": "", | |
"values": false | |
}, | |
"showThresholdLabels": false, | |
"showThresholdMarkers": true, | |
"text": {} | |
}, | |
"pluginVersion": "8.2.0", | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r[\"_measurement\"] == \"disk\")\n |> filter(fn: (r) => r[\"_field\"] == \"used_percent\")\n |> drop(columns: [\"_measurement\", \"host\", \"_field\", \"device\", \"fstype\", \"mode\", \"path\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"timeFrom": null, | |
"timeShift": null, | |
"title": "Disk Usage", | |
"type": "gauge" | |
}, | |
{ | |
"aliasColors": {}, | |
"bars": false, | |
"dashLength": 10, | |
"dashes": false, | |
"datasource": null, | |
"decimals": 2, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"unit": "percent" | |
}, | |
"overrides": [] | |
}, | |
"fill": 1, | |
"fillGradient": 0, | |
"gridPos": { | |
"h": 9, | |
"w": 9, | |
"x": 6, | |
"y": 17 | |
}, | |
"hiddenSeries": false, | |
"id": 19, | |
"legend": { | |
"alignAsTable": false, | |
"avg": true, | |
"current": true, | |
"max": true, | |
"min": true, | |
"rightSide": false, | |
"show": false, | |
"total": false, | |
"values": true | |
}, | |
"lines": true, | |
"linewidth": 1, | |
"nullPointMode": "null", | |
"options": { | |
"alertThreshold": true | |
}, | |
"percentage": false, | |
"pluginVersion": "8.2.0", | |
"pointradius": 1, | |
"points": true, | |
"renderer": "flot", | |
"seriesOverrides": [ | |
{ | |
"alias": "usage_idle cpu-total", | |
"yaxis": 1 | |
} | |
], | |
"spaceLength": 10, | |
"stack": false, | |
"steppedLine": false, | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"disk\")\n |> filter(fn: (r) => r._field == \"used_percent\")\n |> drop(columns: [\"host\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
}, | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "FinalOutput = [\"_field\", \"_time\", \"_value\"]\n\nRawSeries = from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => \n r[\"host\"] == \"${hostname}\" and \n r._measurement == \"disk\" and \n r._field == \"used_percent\" and \n r[\"mode\"] == \"rw\" and \n r[\"device\"] == \"mmcblk0p2\"\n )\n |> drop(columns: [\"_measurement\", \"_field\", \"host\", \"mode\", \"path\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n\nNamedSeries = RawSeries\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field: \"mmcblk0p2\"}))\n |> keep(columns:FinalOutput)\n\nNamedSeries |> yield(name: \"derivative\")", | |
"refId": "B", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"thresholds": [], | |
"timeFrom": null, | |
"timeRegions": [], | |
"timeShift": null, | |
"title": "Disk Usage - Read/Write", | |
"tooltip": { | |
"shared": true, | |
"sort": 0, | |
"value_type": "individual" | |
}, | |
"type": "graph", | |
"xaxis": { | |
"buckets": null, | |
"mode": "time", | |
"name": null, | |
"show": true, | |
"values": [] | |
}, | |
"yaxes": [ | |
{ | |
"decimals": 2, | |
"format": "percent", | |
"label": null, | |
"logBase": 1, | |
"max": null, | |
"min": null, | |
"show": true | |
}, | |
{ | |
"format": "short", | |
"label": null, | |
"logBase": 1, | |
"max": null, | |
"min": null, | |
"show": true | |
} | |
], | |
"yaxis": { | |
"align": false, | |
"alignLevel": null | |
} | |
}, | |
{ | |
"aliasColors": {}, | |
"bars": false, | |
"dashLength": 10, | |
"dashes": false, | |
"datasource": null, | |
"decimals": 2, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"unit": "percent" | |
}, | |
"overrides": [] | |
}, | |
"fill": 1, | |
"fillGradient": 0, | |
"gridPos": { | |
"h": 9, | |
"w": 9, | |
"x": 15, | |
"y": 17 | |
}, | |
"hiddenSeries": false, | |
"id": 20, | |
"legend": { | |
"alignAsTable": true, | |
"avg": true, | |
"current": true, | |
"max": true, | |
"min": true, | |
"rightSide": false, | |
"show": true, | |
"sort": "min", | |
"sortDesc": false, | |
"total": false, | |
"values": true | |
}, | |
"lines": true, | |
"linewidth": 1, | |
"nullPointMode": "null", | |
"options": { | |
"alertThreshold": true | |
}, | |
"percentage": false, | |
"pluginVersion": "8.2.0", | |
"pointradius": 1, | |
"points": true, | |
"renderer": "flot", | |
"seriesOverrides": [ | |
{ | |
"alias": "usage_idle cpu-total", | |
"yaxis": 1 | |
} | |
], | |
"spaceLength": 10, | |
"stack": false, | |
"steppedLine": false, | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"mem\")\n |> filter(fn: (r) => r._field == \"used_percent\")\n |> drop(columns: [\"host\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"thresholds": [], | |
"timeFrom": null, | |
"timeRegions": [], | |
"timeShift": null, | |
"title": "RAM Usage", | |
"tooltip": { | |
"shared": true, | |
"sort": 0, | |
"value_type": "individual" | |
}, | |
"type": "graph", | |
"xaxis": { | |
"buckets": null, | |
"mode": "time", | |
"name": null, | |
"show": true, | |
"values": [] | |
}, | |
"yaxes": [ | |
{ | |
"decimals": 2, | |
"format": "percent", | |
"label": null, | |
"logBase": 1, | |
"max": null, | |
"min": null, | |
"show": true | |
}, | |
{ | |
"format": "short", | |
"label": null, | |
"logBase": 1, | |
"max": null, | |
"min": null, | |
"show": true | |
} | |
], | |
"yaxis": { | |
"align": false, | |
"alignLevel": null | |
} | |
}, | |
{ | |
"collapsed": false, | |
"datasource": null, | |
"gridPos": { | |
"h": 1, | |
"w": 24, | |
"x": 0, | |
"y": 26 | |
}, | |
"id": 22, | |
"panels": [], | |
"title": "Network", | |
"type": "row" | |
}, | |
{ | |
"aliasColors": {}, | |
"bars": false, | |
"dashLength": 10, | |
"dashes": false, | |
"datasource": null, | |
"description": "", | |
"fill": 1, | |
"fillGradient": 0, | |
"gridPos": { | |
"h": 8, | |
"w": 6, | |
"x": 0, | |
"y": 27 | |
}, | |
"hiddenSeries": false, | |
"id": 24, | |
"legend": { | |
"avg": false, | |
"current": false, | |
"max": false, | |
"min": false, | |
"show": true, | |
"total": false, | |
"values": false | |
}, | |
"lines": true, | |
"linewidth": 1, | |
"nullPointMode": "null", | |
"options": { | |
"alertThreshold": true | |
}, | |
"percentage": false, | |
"pluginVersion": "8.2.0", | |
"pointradius": 1, | |
"points": true, | |
"renderer": "flot", | |
"seriesOverrides": [], | |
"spaceLength": 10, | |
"stack": false, | |
"steppedLine": false, | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"system\")\n |> filter(fn: (r) => r._field == \"load1\" or r._field == \"load5\" or r._field == \"load15\")\n |> drop(columns: [\"host\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"thresholds": [], | |
"timeFrom": null, | |
"timeRegions": [], | |
"timeShift": null, | |
"title": "System Load", | |
"tooltip": { | |
"shared": true, | |
"sort": 0, | |
"value_type": "individual" | |
}, | |
"transformations": [], | |
"type": "graph", | |
"xaxis": { | |
"buckets": null, | |
"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 | |
} | |
], | |
"yaxis": { | |
"align": false, | |
"alignLevel": null | |
} | |
}, | |
{ | |
"aliasColors": {}, | |
"bars": false, | |
"dashLength": 10, | |
"dashes": false, | |
"datasource": null, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"unit": "decbytes" | |
}, | |
"overrides": [] | |
}, | |
"fill": 1, | |
"fillGradient": 0, | |
"gridPos": { | |
"h": 8, | |
"w": 6, | |
"x": 6, | |
"y": 27 | |
}, | |
"hiddenSeries": false, | |
"id": 25, | |
"legend": { | |
"avg": false, | |
"current": false, | |
"max": false, | |
"min": false, | |
"show": true, | |
"total": false, | |
"values": false | |
}, | |
"lines": true, | |
"linewidth": 1, | |
"nullPointMode": "null", | |
"options": { | |
"alertThreshold": true | |
}, | |
"percentage": false, | |
"pluginVersion": "8.2.0", | |
"pointradius": 1, | |
"points": true, | |
"renderer": "flot", | |
"seriesOverrides": [], | |
"spaceLength": 10, | |
"stack": false, | |
"steppedLine": false, | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"net\")\n |> filter(fn: (r) => r._field == \"bytes_sent\")\n |> drop(columns: [\"host\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"derivative\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"thresholds": [], | |
"timeFrom": null, | |
"timeRegions": [], | |
"timeShift": null, | |
"title": "Network-Bytes Sent", | |
"tooltip": { | |
"shared": false, | |
"sort": 0, | |
"value_type": "individual" | |
}, | |
"transformations": [], | |
"type": "graph", | |
"xaxis": { | |
"buckets": null, | |
"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 | |
} | |
], | |
"yaxis": { | |
"align": false, | |
"alignLevel": null | |
} | |
}, | |
{ | |
"aliasColors": {}, | |
"bars": false, | |
"dashLength": 10, | |
"dashes": false, | |
"datasource": null, | |
"description": "", | |
"fieldConfig": { | |
"defaults": { | |
"unit": "decbytes" | |
}, | |
"overrides": [] | |
}, | |
"fill": 1, | |
"fillGradient": 0, | |
"gridPos": { | |
"h": 8, | |
"w": 6, | |
"x": 12, | |
"y": 27 | |
}, | |
"hiddenSeries": false, | |
"id": 59, | |
"legend": { | |
"avg": false, | |
"current": false, | |
"max": false, | |
"min": false, | |
"show": true, | |
"total": false, | |
"values": false | |
}, | |
"lines": true, | |
"linewidth": 1, | |
"nullPointMode": "null", | |
"options": { | |
"alertThreshold": true | |
}, | |
"percentage": false, | |
"pluginVersion": "8.2.0", | |
"pointradius": 1, | |
"points": true, | |
"renderer": "flot", | |
"seriesOverrides": [], | |
"spaceLength": 10, | |
"stack": false, | |
"steppedLine": false, | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"net\")\n |> filter(fn: (r) => r._field == \"bytes_recv\")\n |> drop(columns: [\"host\"])\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"thresholds": [], | |
"timeFrom": null, | |
"timeRegions": [], | |
"timeShift": null, | |
"title": "Network-Bytes Received", | |
"tooltip": { | |
"shared": false, | |
"sort": 0, | |
"value_type": "individual" | |
}, | |
"transformations": [], | |
"type": "graph", | |
"xaxis": { | |
"buckets": null, | |
"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 | |
} | |
], | |
"yaxis": { | |
"align": false, | |
"alignLevel": null | |
} | |
}, | |
{ | |
"aliasColors": {}, | |
"bars": false, | |
"dashLength": 10, | |
"dashes": false, | |
"datasource": null, | |
"description": "", | |
"fill": 1, | |
"fillGradient": 0, | |
"gridPos": { | |
"h": 8, | |
"w": 6, | |
"x": 18, | |
"y": 27 | |
}, | |
"hiddenSeries": false, | |
"id": 26, | |
"legend": { | |
"avg": false, | |
"current": false, | |
"max": false, | |
"min": false, | |
"show": true, | |
"total": false, | |
"values": false | |
}, | |
"lines": true, | |
"linewidth": 1, | |
"nullPointMode": "null", | |
"options": { | |
"alertThreshold": true | |
}, | |
"percentage": false, | |
"pluginVersion": "8.2.0", | |
"pointradius": 1, | |
"points": true, | |
"renderer": "flot", | |
"seriesOverrides": [], | |
"spaceLength": 10, | |
"stack": false, | |
"steppedLine": false, | |
"targets": [ | |
{ | |
"groupBy": [ | |
{ | |
"params": [ | |
"$__interval" | |
], | |
"type": "time" | |
}, | |
{ | |
"params": [ | |
"null" | |
], | |
"type": "fill" | |
} | |
], | |
"orderByTime": "ASC", | |
"policy": "default", | |
"query": "from(bucket: v.bucket)\n |> range(start: v.timeRangeStart)\n |> filter(fn: (r) => r[\"host\"] == \"${hostname}\")\n |> filter(fn: (r) => r._measurement == \"processes\")\n |> filter(fn: (r) => r._field == \"running\" or r._field == \"blocked\" or r._field == \"idle\" or r._field == \"unknown\")\n |> drop(columns: [\"host\"])\n |> aggregateWindow(every: v.windowPeriod, fn: max)\n |> yield(name: \"max\")", | |
"refId": "A", | |
"resultFormat": "time_series", | |
"select": [ | |
[ | |
{ | |
"params": [ | |
"value" | |
], | |
"type": "field" | |
}, | |
{ | |
"params": [], | |
"type": "mean" | |
} | |
] | |
], | |
"tags": [] | |
} | |
], | |
"thresholds": [], | |
"timeFrom": null, | |
"timeRegions": [], | |
"timeShift": null, | |
"title": "Processes", | |
"tooltip": { | |
"shared": false, | |
"sort": 0, | |
"value_type": "individual" | |
}, | |
"type": "graph", | |
"xaxis": { | |
"buckets": null, | |
"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 | |
} | |
], | |
"yaxis": { | |
"align": false, | |
"alignLevel": null | |
} | |
} | |
], | |
"refresh": "5s", | |
"schemaVersion": 31, | |
"style": "dark", | |
"tags": [], | |
"templating": { | |
"list": [ | |
{ | |
"description": null, | |
"error": null, | |
"hide": 2, | |
"label": "", | |
"name": "hostname", | |
"query": "nidhin", | |
"skipUrlSync": false, | |
"type": "constant" | |
} | |
] | |
}, | |
"time": { | |
"from": "now-5m", | |
"to": "now" | |
}, | |
"timepicker": {}, | |
"timezone": "", | |
"title": "Systemmetric", | |
"uid": "Vr3jjmPGa", | |
"version": 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment