diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index ede8e362..7be0c2e9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,36 +1,105 @@
repos:
+ - repo: https://github.com/gitleaks/gitleaks
+ rev: v8.24.2
+ hooks:
+ - id: gitleaks
+ name: "馃敀 security 路 Detect hardcoded secrets"
+
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.1
hooks:
- # Run the linter.
- id: ruff-check
+ name: "馃悕 python 路 Linter with Ruff"
types_or: [ python, pyi ]
args: [ --fix, --exit-non-zero-on-fix ]
- # Run the formatter.
- id: ruff-format
+ name: "馃悕 python 路 Format with Ruff"
types_or: [ python, pyi ]
+ # - repo: https://github.com/RobertCraigie/pyright-python
+ # rev: v1.1.391
+ # hooks:
+ # - id: pyright
+ # name: "馃悕 python 路 Check types"
+
+ # - repo: https://github.com/biomejs/pre-commit
+ # rev: "v2.3.7"
+ # hooks:
+ # - id: biome-check
+ # name: "馃煥 javascript 路 Lint, format, and safe fixes with Biome"
+
+ - repo: https://github.com/python-jsonschema/check-jsonschema
+ rev: 0.35.0
+ hooks:
+ - id: check-github-workflows
+ name: "馃悪 github-actions 路 Validate gh workflow files"
+ args: ["--verbose"]
+
+ - repo: https://github.com/shellcheck-py/shellcheck-py
+ rev: v0.11.0.1
+ hooks:
+ - id: shellcheck
+ name: "馃悮 shell 路 Lint shell scripts"
+
+ - repo: https://github.com/openstack/bashate
+ rev: 2.1.1
+ hooks:
+ - id: bashate
+ name: "馃悮 shell 路 Check shell script code style"
+ entry: bashate --error . --ignore=E006
+
+ - repo: https://github.com/mrtazz/checkmake.git
+ rev: 0.2.2
+ hooks:
+ - id: checkmake
+ name: "馃惍 Makefile 路 Lint Makefile"
+
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- - id: check-ast
- - id: check-docstring-first
- - id: check-json
- - id: check-merge-conflict
+ - id: check-executables-have-shebangs
+ name: "馃搧 filesystem/鈿欙笍 exec 路 Verify shebang presence"
- id: check-shebang-scripts-are-executable
+ name: "馃搧 filesystem/鈿欙笍 exec 路 Verify script permissions"
+ - id: check-case-conflict
+ name: "馃搧 filesystem/馃摑 names 路 Check case sensitivity"
+ - id: destroyed-symlinks
+ name: "馃搧 filesystem/馃敆 symlink 路 Detect broken symlinks"
+ - id: check-merge-conflict
+ name: "馃尦 git 路 Detect conflict markers"
+ - id: forbid-new-submodules
+ name: "馃尦 git 路 Prevent submodule creation"
+ - id: no-commit-to-branch
+ name: "馃尦 git 路 Protect main branches"
+ args: ["--branch", "main", "--branch", "master"]
+ - id: check-added-large-files
+ name: "馃尦 git 路 Block large file commits"
+ args: ['--maxkb=5000']
+ - id: check-ast
+ name: "馃悕 python/馃攳 quality 路 Validate Python AST"
+ - id: check-docstring-first
+ name: "馃悕 python/馃摑 style 路 Enforce docstring at top"
+ - id: check-json
+ name: "馃搫 formats/json 路 Validate JSON files"
+ - id: check-shebang-scripts-are-executable
+ name: "馃搧 filesystem/鈿欙笍 exec 路 Ensure scripts are executable"
- id: check-toml
+ name: "馃搫 formats/toml 路 Validate TOML files"
- id: check-yaml
+ name: "馃搫 formats/yaml 路 Validate YAML syntax"
- id: debug-statements
+ name: "馃悕 python/馃 debug 路 Detect debug statements"
- id: detect-private-key
+ name: "馃攼 security 路 Detect private keys"
- id: mixed-line-ending
+ name: "馃搫 text/鈫╋笍 newline 路 Normalize line endings"
- id: requirements-txt-fixer
+ name: "馃悕 python/馃摝 deps 路 Sort requirements.txt"
- repo: local
hooks:
- # test duplicate line at the end of file with a custom script
- # /bin/bash tests-data/tools/find-duplicate-lines.sh
- id: find-duplicate-lines
- name: find duplicate lines at the end of file
+ name: "鉂楋笍local script 路 Find duplicate lines at the end of file"
entry: bash tests-data/tools/find-duplicate-lines.sh
language: system
types: [python]
diff --git a/Makefile b/Makefile
index 08e0f262..9d6bc507 100644
--- a/Makefile
+++ b/Makefile
@@ -20,14 +20,12 @@ UV_RUN := .venv-uv/bin/uv
# if the command is only `make`, the default tasks will be the printing of the help.
.DEFAULT_GOAL := help
-.PHONY: help test docs docs-server venv
+.PHONY: help test docs docs-server venv requirements profiling docker all clean
help: ## List all make commands available
@grep -E '^[\.a-zA-Z_%-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk -F ":" '{print $1}' | \
- grep -v % | \
- sed 's/\\//g' | \
- sort | \
+ grep -v % | sed 's/\\//g' | sort | \
awk 'BEGIN {FS = ":[^:]*?##"}; {printf "\033[1;34mmake %-50s\033[0m %s\n", $$1, $$2}'
# ===================================================================
@@ -142,7 +140,10 @@ test-exports: test-export-csv test-export-json test-export-influxdb-v1 test-expo
# Linters, profilers and cyber security
# ===================================================================
-find-duplicate-lines:
+pre-commit: ## Run pre-commit hooks
+ $(UV_RUN) run pre-commit run --all-files
+
+find-duplicate-lines: ## Search for duplicate lines in files
/bin/bash tests-data/tools/find-duplicate-lines.sh
format: ## Format the code
diff --git a/conf/glances-grafana-flux.json b/conf/glances-grafana-flux.json
index aff10179..9e6aa4ad 100644
--- a/conf/glances-grafana-flux.json
+++ b/conf/glances-grafana-flux.json
@@ -1,2453 +1,2297 @@
{
- "__inputs": [
- {
- "name": "DS_GLANCES",
- "label": "glances",
- "description": "",
- "type": "datasource",
- "pluginId": "influxdb",
- "pluginName": "InfluxDB"
- }
- ],
- "__requires": [
- {
- "type": "grafana",
- "id": "grafana",
- "name": "Grafana",
- "version": "8.2.5"
- },
- {
- "type": "panel",
- "id": "heatmap",
- "name": "Heatmap",
- "version": ""
- },
- {
- "type": "datasource",
- "id": "influxdb",
- "name": "InfluxDB",
- "version": "1.0.0"
- },
- {
- "type": "panel",
- "id": "stat",
- "name": "Stat",
- "version": ""
- },
- {
- "type": "panel",
- "id": "timeseries",
- "name": "Time series",
- "version": ""
- }
- ],
- "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": null,
- "iteration": 1638092370245,
- "links": [],
- "liveNow": false,
- "panels": [
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "id": 29,
- "panels": [],
- "title": "Glances $host",
- "type": "row"
- },
- {
- "cacheTimeout": null,
- "datasource": "${DS_GLANCES}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "none"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 6,
- "w": 2,
- "x": 0,
- "y": 1
- },
- "id": 5,
- "interval": null,
- "links": [],
- "maxDataPoints": 100,
- "options": {
- "colorMode": "none",
- "graphMode": "none",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "8.2.5",
- "targets": [
- {
- "column": "cpucore",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- }
- ],
- "measurement": "load",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"cpucore\" and\n r.hostname == \"${host}\"\n )\n |> last()",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "cpucore"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "max"
- }
- ]
- ],
- "series": "load",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- }
- ],
- "title": "Core",
- "type": "stat"
- },
- {
- "datasource": "${DS_GLANCES}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 10,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 2,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": true,
- "stacking": {
- "group": "A",
- "mode": "normal"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "short"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 6,
- "w": 20,
- "x": 2,
- "y": 1
- },
- "id": 4,
- "links": [],
- "options": {
- "legend": {
- "calcs": [
- "mean",
- "max",
- "min"
- ],
- "displayMode": "table",
- "placement": "right"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "pluginVersion": "8.2.5",
- "targets": [
- {
- "alias": "1min",
- "column": "min1",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "load",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"min5\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean5\")\n \n ",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "min1"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "load",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": "randomWalk('random walk')"
- },
- {
- "alias": "1min",
- "column": "min1",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "measurement": "load",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"min15\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean15\")\n \n ",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "min1"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "load",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": "randomWalk('random walk')"
- },
- {
- "alias": "1min",
- "column": "min1",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "measurement": "load",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"min1\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean1\")\n \n ",
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "min1"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "load",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": "randomWalk('random walk')"
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Load",
- "type": "timeseries"
- },
- {
- "cacheTimeout": null,
- "datasource": "${DS_GLANCES}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "rgb(31, 120, 193)",
- "mode": "fixed"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "none"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 6,
- "w": 2,
- "x": 22,
- "y": 1
- },
- "id": 18,
- "interval": null,
- "links": [],
- "maxDataPoints": 100,
- "options": {
- "colorMode": "none",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "8.2.5",
- "targets": [
- {
- "column": "total",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- }
- ],
- "measurement": "processcount",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"processcount\" and\n r._field == \"total\" and\n r.hostname == \"${host}\"\n )\n |> last()",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "total"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "series": "processcount",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- }
- ],
- "title": "Processes",
- "type": "stat"
- },
- {
- "datasource": "${DS_GLANCES}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": true,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "percent"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 7
- },
- "id": 6,
- "links": [],
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "pluginVersion": "8.2.5",
- "targets": [
- {
- "alias": "User",
- "column": "user",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "cpu",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"user\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"user\")\n \n ",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "user"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "cpu",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- },
- {
- "alias": "System",
- "column": "system",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "cpu",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"system\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"system\")\n \n ",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "system"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "cpu",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": ""
- },
- {
- "alias": "IoWait",
- "column": "iowait",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "cpu",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"iowait\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"iowait\")\n \n ",
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "iowait"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "cpu",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": ""
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU (%)",
- "type": "timeseries"
- },
- {
- "datasource": "${DS_GLANCES}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": true,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "bytes"
- },
- "overrides": [
- {
- "matcher": {
- "id": "byRegexp",
- "options": "/.*total./"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "dark-red",
- "mode": "fixed"
- }
- },
- {
- "id": "custom.lineWidth",
- "value": 2
- }
- ]
- },
- {
- "matcher": {
- "id": "byRegexp",
- "options": "/^used.*$/"
- },
- "properties": [
- {
- "id": "custom.fillOpacity",
- "value": 30
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 12,
- "y": 7
- },
- "id": 7,
- "links": [],
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "pluginVersion": "8.2.5",
- "targets": [
- {
- "alias": "Used",
- "column": "used",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "mem",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"mem\" and\n r._field == \"used\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"used\")\n \n ",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "used"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "mem",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- },
- {
- "alias": "Max",
- "column": "total",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "mem",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"mem\" and\n r._field == \"total\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"total\")\n \n ",
- "rawQuery": false,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "total"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "mem",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": ""
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "MEM",
- "type": "timeseries"
- },
- {
- "datasource": "${DS_GLANCES}",
- "description": "",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 30,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": true,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "bps"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 14
- },
- "id": 9,
- "links": [],
- "options": {
- "legend": {
- "calcs": [
- "mean",
- "max",
- "min"
- ],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "pluginVersion": "8.2.5",
- "targets": [
- {
- "alias": "In",
- "column": "enp0s25.rx",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "interval": "",
- "measurement": "$host.network",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"network\" and\n (r._field == \"rx\" or r._field == \"time_since_update\") and\n r.interface_name == \"${interface}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.rx / r.time_since_update) * 8.0 }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"rx_rate\"})\n",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "eth0.rx"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "network",
- "tags": []
- },
- {
- "alias": "Out",
- "column": "eth0.tx*-1",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "$host.network",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"network\" and\n (r._field == \"tx\" or r._field == \"time_since_update\") and\n r.interface_name == \"${interface}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.tx / r.time_since_update) * -8.0 }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"tx_rate\"})\n",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "eth0.tx"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "network",
- "tags": [],
- "target": ""
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "$interface network interface",
- "transformations": [],
- "type": "timeseries"
- },
- {
- "datasource": "${DS_GLANCES}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": true,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "bytes"
- },
- "overrides": [
- {
- "matcher": {
- "id": "byRegexp",
- "options": "/total.*/"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "dark-red",
- "mode": "fixed"
- }
- },
- {
- "id": "custom.lineWidth",
- "value": 2
- }
- ]
- },
- {
- "matcher": {
- "id": "byRegexp",
- "options": "/used.*/"
- },
- "properties": [
- {
- "id": "custom.fillOpacity",
- "value": 30
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 12,
- "y": 14
- },
- "id": 8,
- "links": [],
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "pluginVersion": "8.2.5",
- "targets": [
- {
- "alias": "Used",
- "column": "used",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- }
- ],
- "measurement": "$host.memswap",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"memswap\" and\n r._field == \"used\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"used\")\n ",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "used"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "memswap",
- "tags": []
- },
- {
- "alias": "Max",
- "column": "total",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- }
- ],
- "measurement": "$host.memswap",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"memswap\" and\n r._field == \"total\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"total\")\n \n ",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "total"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "memswap",
- "tags": [],
- "target": ""
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "SWAP",
- "type": "timeseries"
- },
- {
- "datasource": "${DS_GLANCES}",
- "description": "",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 15,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": true,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "bytes"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 21
- },
- "id": 10,
- "links": [],
- "options": {
- "legend": {
- "calcs": [
- "mean",
- "max",
- "min"
- ],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "pluginVersion": "8.2.5",
- "targets": [
- {
- "alias": "Read",
- "column": "sda2.read_bytes",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "$host.diskio",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"diskio\" and\n (r._field == \"read_bytes\" or r._field == \"time_since_update\") and\n r.disk_name == \"${disk}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.read_bytes / r.time_since_update) }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"read_rate\"})\n",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "sda2.read_bytes"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "diskio",
- "tags": []
- },
- {
- "alias": "Write",
- "column": "sda2.write_bytes",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "$host.diskio",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"diskio\" and\n (r._field == \"write_bytes\" or r._field == \"time_since_update\") and\n r.disk_name == \"${disk}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.write_bytes / r.time_since_update) * -1.0 }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"write_rate\"})\n",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "sda2.write_bytes"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "diskio",
- "tags": [],
- "target": ""
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "$disk disk IO",
- "type": "timeseries"
- },
- {
- "datasource": "${DS_GLANCES}",
- "description": "",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 3,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": true,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "bytes"
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "Max"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "#BF1B00",
- "mode": "fixed"
- }
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Used"
- },
- "properties": [
- {
- "id": "custom.fillOpacity",
- "value": 100
- },
- {
- "id": "custom.fillOpacity",
- "value": 80
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 7,
- "w": 10,
- "x": 12,
- "y": 21
- },
- "id": 11,
- "links": [],
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "pluginVersion": "8.2.5",
- "targets": [
- {
- "alias": "Used",
- "column": "\"/.used\"",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "fs",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"fs\" and\n r._field == \"used\" and\n r.mnt_point == \"/\" and \n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"used\")\n \n ",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "used"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "fs",
- "tags": [
- {
- "key": "mnt_point",
- "operator": "=",
- "value": "/"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- },
- {
- "alias": "Max",
- "column": "\"/.size\"",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "fs",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"fs\" and\n r._field == \"size\" and\n r.mnt_point == \"/\" and \n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"size\")\n \n ",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "size"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "fs",
- "tags": [
- {
- "key": "mnt_point",
- "operator": "=",
- "value": "/"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": ""
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "/ Size",
- "type": "timeseries"
- },
- {
- "cacheTimeout": null,
- "datasource": "${DS_GLANCES}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "rgba(71, 212, 59, 0.4)",
- "value": null
- },
- {
- "color": "rgba(245, 150, 40, 0.73)",
- "value": 70
- },
- {
- "color": "rgba(225, 40, 40, 0.59)",
- "value": 90
- }
- ]
- },
- "unit": "percent"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 2,
- "x": 22,
- "y": 21
- },
- "id": 16,
- "interval": null,
- "links": [],
- "maxDataPoints": 100,
- "options": {
- "colorMode": "background",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "8.2.5",
- "targets": [
- {
- "column": "\"/.percent\"",
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- }
- ],
- "measurement": "fs",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"fs\" and\n r._field == \"percent\" and\n r.mnt_point == \"/\" and \n r.hostname == \"${host}\"\n )\n |> last()\n",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "percent"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "fs",
- "tags": [
- {
- "key": "mnt_point",
- "operator": "=",
- "value": "/"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- }
- ],
- "title": "/ used",
- "type": "stat"
- },
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 28
- },
- "id": 33,
- "panels": [],
- "title": "Sensors $host",
- "type": "row"
- },
- {
- "cards": {
- "cardPadding": null,
- "cardRound": null
- },
- "color": {
- "cardColor": "rgb(255, 0, 0)",
- "colorScale": "sqrt",
- "colorScheme": "interpolateReds",
- "exponent": 1,
- "min": null,
- "mode": "opacity"
- },
- "dataFormat": "timeseries",
- "datasource": "${DS_GLANCES}",
- "gridPos": {
- "h": 6,
- "w": 12,
- "x": 0,
- "y": 29
- },
- "heatmap": {},
- "hideZeroBuckets": false,
- "highlightCards": true,
- "id": 21,
- "legend": {
- "show": false
- },
- "links": [],
- "reverseYBuckets": false,
- "targets": [
- {
- "alias": "AmbientTemperature",
- "dsType": "influxdb",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "sensors",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"sensors\" and\n r._field == \"value\" and\n r.label == \"Ambient\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"Ambient\")\n \n ",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "key": "label",
- "operator": "=",
- "value": "Ambient"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- }
- ],
- "title": "Ambient temperature",
- "tooltip": {
- "show": true,
- "showHistogram": false
- },
- "type": "heatmap",
- "xAxis": {
- "show": true
- },
- "xBucketNumber": null,
- "xBucketSize": null,
- "yAxis": {
- "decimals": null,
- "format": "celsius",
- "logBase": 1,
- "max": null,
- "min": "0",
- "show": true,
- "splitFactor": null
- },
- "yBucketBound": "auto",
- "yBucketNumber": null,
- "yBucketSize": null
- },
- {
- "cards": {
- "cardPadding": null,
- "cardRound": null
- },
- "color": {
- "cardColor": "rgb(255, 0, 0)",
- "colorScale": "sqrt",
- "colorScheme": "interpolateOranges",
- "exponent": 1,
- "mode": "opacity"
- },
- "dataFormat": "timeseries",
- "datasource": "${DS_GLANCES}",
- "gridPos": {
- "h": 6,
- "w": 12,
- "x": 12,
- "y": 29
- },
- "heatmap": {},
- "hideZeroBuckets": false,
- "highlightCards": true,
- "id": 23,
- "legend": {
- "show": false
- },
- "links": [],
- "reverseYBuckets": false,
- "targets": [
- {
- "alias": "CpuTemperature",
- "dsType": "influxdb",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "sensors",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"sensors\" and\n r._field == \"value\" and\n r.label == \"CPU\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"Ambient\")\n \n ",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "key": "label",
- "operator": "=",
- "value": "CPU"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- }
- ],
- "title": "CPU temperature",
- "tooltip": {
- "show": true,
- "showHistogram": false
- },
- "type": "heatmap",
- "xAxis": {
- "show": true
- },
- "xBucketNumber": null,
- "xBucketSize": null,
- "yAxis": {
- "decimals": null,
- "format": "celsius",
- "logBase": 1,
- "max": null,
- "min": "0",
- "show": true,
- "splitFactor": null
- },
- "yBucketBound": "auto",
- "yBucketNumber": null,
- "yBucketSize": null
- },
- {
- "collapsed": false,
- "datasource": null,
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 35
- },
- "id": 37,
- "panels": [],
- "title": "Containers hosted on $host",
- "type": "row"
- },
- {
- "datasource": "${DS_GLANCES}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 2,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": true,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "short"
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "cpu_percent"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "#cca300",
- "mode": "fixed"
- }
- },
- {
- "id": "unit",
- "value": "percent"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "memory_usage"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "#2f575e",
- "mode": "fixed"
- }
- },
- {
- "id": "unit",
- "value": "decbytes"
- },
- {
- "id": "custom.fillOpacity",
- "value": 36
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 8,
- "w": 24,
- "x": 0,
- "y": 36
- },
- "id": 25,
- "links": [],
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single"
- }
- },
- "pluginVersion": "8.2.5",
- "repeat": "container",
- "repeatDirection": "v",
- "targets": [
- {
- "alias": "MEM",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "measurement": "containers",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"containers\" and\n r._field == \"memory_usage\" and\n r.name == \"${container}\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"MEM\")\n \n ",
- "rawQuery": false,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "memory_usage"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "key": "name",
- "operator": "=~",
- "value": "/^$container$/"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- },
- {
- "alias": "CPU%",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "measurement": "containers",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"containers\" and\n r._field == \"cpu_percent\" and\n r.name == \"${container}\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"CPU%\")\n \n ",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "cpu_percent"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "key": "name",
- "operator": "=~",
- "value": "/^$container$/"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- }
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "$container container",
- "type": "timeseries"
- }
- ],
- "refresh": "5s",
- "schemaVersion": 32,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "allValue": null,
- "current": {},
- "datasource": "${DS_GLANCES}",
- "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"hostname\",\n predicate: (r) => true,\n start: -1d\n)",
- "description": null,
- "error": null,
- "hide": 0,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "host",
- "options": [],
- "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"hostname\",\n predicate: (r) => true,\n start: -1d\n)",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {},
- "datasource": "${DS_GLANCES}",
- "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"name\",\n predicate: (r) => true,\n start: -1d\n)",
- "description": null,
- "error": null,
- "hide": 0,
- "includeAll": true,
- "label": null,
- "multi": true,
- "name": "container",
- "options": [],
- "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"name\",\n predicate: (r) => true,\n start: -1d\n)",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 1,
- "tagValuesQuery": "",
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {},
- "datasource": "${DS_GLANCES}",
- "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"interface_name\",\n predicate: (r) => true,\n start: -1d\n)",
- "description": null,
- "error": null,
- "hide": 0,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "interface",
- "options": [],
- "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"interface_name\",\n predicate: (r) => true,\n start: -1d\n)",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 1,
- "tagValuesQuery": "",
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {},
- "datasource": "${DS_GLANCES}",
- "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"disk_name\",\n predicate: (r) => true,\n start: -1d\n)",
- "description": null,
- "error": null,
- "hide": 0,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "disk",
- "options": [],
- "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"disk_name\",\n predicate: (r) => true,\n start: -1d\n)",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 1,
- "tagValuesQuery": "",
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "collapse": false,
- "enable": true,
- "notice": false,
- "now": true,
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "status": "Stable",
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ],
- "type": "timepicker"
- },
- "timezone": "browser",
- "title": "Glances For FLUX",
- "uid": "ESYAe0tnk",
- "version": 21
+ "__inputs": [
+ {
+ "name": "DS_GLANCES",
+ "label": "glances",
+ "description": "",
+ "type": "datasource",
+ "pluginId": "influxdb",
+ "pluginName": "InfluxDB"
+ }
+ ],
+ "__requires": [
+ {
+ "type": "grafana",
+ "id": "grafana",
+ "name": "Grafana",
+ "version": "8.2.5"
+ },
+ {
+ "type": "panel",
+ "id": "heatmap",
+ "name": "Heatmap",
+ "version": ""
+ },
+ {
+ "type": "datasource",
+ "id": "influxdb",
+ "name": "InfluxDB",
+ "version": "1.0.0"
+ },
+ {
+ "type": "panel",
+ "id": "stat",
+ "name": "Stat",
+ "version": ""
+ },
+ {
+ "type": "panel",
+ "id": "timeseries",
+ "name": "Time series",
+ "version": ""
+ }
+ ],
+ "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": null,
+ "iteration": 1638092370245,
+ "links": [],
+ "liveNow": false,
+ "panels": [
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 29,
+ "panels": [],
+ "title": "Glances $host",
+ "type": "row"
+ },
+ {
+ "cacheTimeout": null,
+ "datasource": "${DS_GLANCES}",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [
+ {
+ "options": {
+ "match": "null",
+ "result": {
+ "text": "N/A"
+ }
+ },
+ "type": "special"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "none"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 2,
+ "x": 0,
+ "y": 1
+ },
+ "id": 5,
+ "interval": null,
+ "links": [],
+ "maxDataPoints": 100,
+ "options": {
+ "colorMode": "none",
+ "graphMode": "none",
+ "justifyMode": "auto",
+ "orientation": "horizontal",
+ "reduceOptions": {
+ "calcs": ["lastNotNull"],
+ "fields": "",
+ "values": false
+ },
+ "text": {},
+ "textMode": "auto"
+ },
+ "pluginVersion": "8.2.5",
+ "targets": [
+ {
+ "column": "cpucore",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ }
+ ],
+ "measurement": "load",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"cpucore\" and\n r.hostname == \"${host}\"\n )\n |> last()",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["cpucore"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "max"
+ }
+ ]
+ ],
+ "series": "load",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ }
+ ],
+ "title": "Core",
+ "type": "stat"
+ },
+ {
+ "datasource": "${DS_GLANCES}",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 2,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "normal"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "short"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 20,
+ "x": 2,
+ "y": 1
+ },
+ "id": 4,
+ "links": [],
+ "options": {
+ "legend": {
+ "calcs": ["mean", "max", "min"],
+ "displayMode": "table",
+ "placement": "right"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.2.5",
+ "targets": [
+ {
+ "alias": "1min",
+ "column": "min1",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "load",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"min5\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean5\")\n \n ",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["min1"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "load",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": "randomWalk('random walk')"
+ },
+ {
+ "alias": "1min",
+ "column": "min1",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "measurement": "load",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"min15\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean15\")\n \n ",
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["min1"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "load",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": "randomWalk('random walk')"
+ },
+ {
+ "alias": "1min",
+ "column": "min1",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "measurement": "load",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"load\" and\n r._field == \"min1\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean1\")\n \n ",
+ "refId": "C",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["min1"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "load",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": "randomWalk('random walk')"
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Load",
+ "type": "timeseries"
+ },
+ {
+ "cacheTimeout": null,
+ "datasource": "${DS_GLANCES}",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "rgb(31, 120, 193)",
+ "mode": "fixed"
+ },
+ "mappings": [
+ {
+ "options": {
+ "match": "null",
+ "result": {
+ "text": "N/A"
+ }
+ },
+ "type": "special"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "none"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 2,
+ "x": 22,
+ "y": 1
+ },
+ "id": 18,
+ "interval": null,
+ "links": [],
+ "maxDataPoints": 100,
+ "options": {
+ "colorMode": "none",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "horizontal",
+ "reduceOptions": {
+ "calcs": ["mean"],
+ "fields": "",
+ "values": false
+ },
+ "text": {},
+ "textMode": "auto"
+ },
+ "pluginVersion": "8.2.5",
+ "targets": [
+ {
+ "column": "total",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ }
+ ],
+ "measurement": "processcount",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"processcount\" and\n r._field == \"total\" and\n r.hostname == \"${host}\"\n )\n |> last()",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["total"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "series": "processcount",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ }
+ ],
+ "title": "Processes",
+ "type": "stat"
+ },
+ {
+ "datasource": "${DS_GLANCES}",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "percent"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 0,
+ "y": 7
+ },
+ "id": 6,
+ "links": [],
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.2.5",
+ "targets": [
+ {
+ "alias": "User",
+ "column": "user",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "cpu",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"user\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"user\")\n \n ",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["user"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "cpu",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ },
+ {
+ "alias": "System",
+ "column": "system",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "cpu",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"system\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"system\")\n \n ",
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["system"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "cpu",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": ""
+ },
+ {
+ "alias": "IoWait",
+ "column": "iowait",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "cpu",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"cpu\" and\n r._field == \"iowait\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"iowait\")\n \n ",
+ "refId": "C",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["iowait"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "cpu",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": ""
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "CPU (%)",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "${DS_GLANCES}",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "min": 0,
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byRegexp",
+ "options": "/.*total./"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "dark-red",
+ "mode": "fixed"
+ }
+ },
+ {
+ "id": "custom.lineWidth",
+ "value": 2
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byRegexp",
+ "options": "/^used.*$/"
+ },
+ "properties": [
+ {
+ "id": "custom.fillOpacity",
+ "value": 30
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 12,
+ "y": 7
+ },
+ "id": 7,
+ "links": [],
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.2.5",
+ "targets": [
+ {
+ "alias": "Used",
+ "column": "used",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "mem",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"mem\" and\n r._field == \"used\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"used\")\n \n ",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["used"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "mem",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ },
+ {
+ "alias": "Max",
+ "column": "total",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "mem",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"mem\" and\n r._field == \"total\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"total\")\n \n ",
+ "rawQuery": false,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["total"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "mem",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": ""
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "MEM",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "${DS_GLANCES}",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 30,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bps"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 0,
+ "y": 14
+ },
+ "id": 9,
+ "links": [],
+ "options": {
+ "legend": {
+ "calcs": ["mean", "max", "min"],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.2.5",
+ "targets": [
+ {
+ "alias": "In",
+ "column": "enp0s25.rx",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["null"],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "interval": "",
+ "measurement": "$host.network",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"network\" and\n (r._field == \"rx\" or r._field == \"time_since_update\") and\n r.interface_name == \"${interface}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.rx / r.time_since_update) * 8.0 }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"rx_rate\"})\n",
+ "rawQuery": true,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["eth0.rx"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "network",
+ "tags": []
+ },
+ {
+ "alias": "Out",
+ "column": "eth0.tx*-1",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["null"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "$host.network",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"network\" and\n (r._field == \"tx\" or r._field == \"time_since_update\") and\n r.interface_name == \"${interface}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.tx / r.time_since_update) * -8.0 }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"tx_rate\"})\n",
+ "rawQuery": true,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["eth0.tx"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "network",
+ "tags": [],
+ "target": ""
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "$interface network interface",
+ "transformations": [],
+ "type": "timeseries"
+ },
+ {
+ "datasource": "${DS_GLANCES}",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "min": 0,
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byRegexp",
+ "options": "/total.*/"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "dark-red",
+ "mode": "fixed"
+ }
+ },
+ {
+ "id": "custom.lineWidth",
+ "value": 2
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byRegexp",
+ "options": "/used.*/"
+ },
+ "properties": [
+ {
+ "id": "custom.fillOpacity",
+ "value": 30
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 12,
+ "y": 14
+ },
+ "id": 8,
+ "links": [],
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.2.5",
+ "targets": [
+ {
+ "alias": "Used",
+ "column": "used",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ }
+ ],
+ "measurement": "$host.memswap",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"memswap\" and\n r._field == \"used\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"used\")\n ",
+ "rawQuery": true,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["used"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "memswap",
+ "tags": []
+ },
+ {
+ "alias": "Max",
+ "column": "total",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ }
+ ],
+ "measurement": "$host.memswap",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"memswap\" and\n r._field == \"total\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"total\")\n \n ",
+ "rawQuery": true,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["total"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "memswap",
+ "tags": [],
+ "target": ""
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "SWAP",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "${DS_GLANCES}",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 15,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 0,
+ "y": 21
+ },
+ "id": 10,
+ "links": [],
+ "options": {
+ "legend": {
+ "calcs": ["mean", "max", "min"],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.2.5",
+ "targets": [
+ {
+ "alias": "Read",
+ "column": "sda2.read_bytes",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "$host.diskio",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"diskio\" and\n (r._field == \"read_bytes\" or r._field == \"time_since_update\") and\n r.disk_name == \"${disk}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.read_bytes / r.time_since_update) }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"read_rate\"})\n",
+ "rawQuery": true,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["sda2.read_bytes"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "diskio",
+ "tags": []
+ },
+ {
+ "alias": "Write",
+ "column": "sda2.write_bytes",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "$host.diskio",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"diskio\" and\n (r._field == \"write_bytes\" or r._field == \"time_since_update\") and\n r.disk_name == \"${disk}\" and\n r.hostname == \"${host}\"\n )\n |> pivot(\n rowKey:[\"_time\"],\n columnKey: [\"_field\"],\n valueColumn: \"_value\"\n )\n |> map(fn: (r) => ({ r with _value: (r.write_bytes / r.time_since_update) * -1.0 }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"write_rate\"})\n",
+ "rawQuery": true,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["sda2.write_bytes"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "diskio",
+ "tags": [],
+ "target": ""
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "$disk disk IO",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "${DS_GLANCES}",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 3,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "min": 0,
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Max"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "#BF1B00",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Used"
+ },
+ "properties": [
+ {
+ "id": "custom.fillOpacity",
+ "value": 100
+ },
+ {
+ "id": "custom.fillOpacity",
+ "value": 80
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 10,
+ "x": 12,
+ "y": 21
+ },
+ "id": 11,
+ "links": [],
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.2.5",
+ "targets": [
+ {
+ "alias": "Used",
+ "column": "\"/.used\"",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "fs",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"fs\" and\n r._field == \"used\" and\n r.mnt_point == \"/\" and \n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"used\")\n \n ",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["used"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "fs",
+ "tags": [
+ {
+ "key": "mnt_point",
+ "operator": "=",
+ "value": "/"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ },
+ {
+ "alias": "Max",
+ "column": "\"/.size\"",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "fs",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"fs\" and\n r._field == \"size\" and\n r.mnt_point == \"/\" and \n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"size\")\n \n ",
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["size"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "fs",
+ "tags": [
+ {
+ "key": "mnt_point",
+ "operator": "=",
+ "value": "/"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": ""
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "/ Size",
+ "type": "timeseries"
+ },
+ {
+ "cacheTimeout": null,
+ "datasource": "${DS_GLANCES}",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [
+ {
+ "options": {
+ "match": "null",
+ "result": {
+ "text": "N/A"
+ }
+ },
+ "type": "special"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "rgba(71, 212, 59, 0.4)",
+ "value": null
+ },
+ {
+ "color": "rgba(245, 150, 40, 0.73)",
+ "value": 70
+ },
+ {
+ "color": "rgba(225, 40, 40, 0.59)",
+ "value": 90
+ }
+ ]
+ },
+ "unit": "percent"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 2,
+ "x": 22,
+ "y": 21
+ },
+ "id": 16,
+ "interval": null,
+ "links": [],
+ "maxDataPoints": 100,
+ "options": {
+ "colorMode": "background",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "horizontal",
+ "reduceOptions": {
+ "calcs": ["mean"],
+ "fields": "",
+ "values": false
+ },
+ "text": {},
+ "textMode": "auto"
+ },
+ "pluginVersion": "8.2.5",
+ "targets": [
+ {
+ "column": "\"/.percent\"",
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ }
+ ],
+ "measurement": "fs",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"fs\" and\n r._field == \"percent\" and\n r.mnt_point == \"/\" and \n r.hostname == \"${host}\"\n )\n |> last()\n",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["percent"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "fs",
+ "tags": [
+ {
+ "key": "mnt_point",
+ "operator": "=",
+ "value": "/"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ }
+ ],
+ "title": "/ used",
+ "type": "stat"
+ },
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 28
+ },
+ "id": 33,
+ "panels": [],
+ "title": "Sensors $host",
+ "type": "row"
+ },
+ {
+ "cards": {
+ "cardPadding": null,
+ "cardRound": null
+ },
+ "color": {
+ "cardColor": "rgb(255, 0, 0)",
+ "colorScale": "sqrt",
+ "colorScheme": "interpolateReds",
+ "exponent": 1,
+ "min": null,
+ "mode": "opacity"
+ },
+ "dataFormat": "timeseries",
+ "datasource": "${DS_GLANCES}",
+ "gridPos": {
+ "h": 6,
+ "w": 12,
+ "x": 0,
+ "y": 29
+ },
+ "heatmap": {},
+ "hideZeroBuckets": false,
+ "highlightCards": true,
+ "id": 21,
+ "legend": {
+ "show": false
+ },
+ "links": [],
+ "reverseYBuckets": false,
+ "targets": [
+ {
+ "alias": "AmbientTemperature",
+ "dsType": "influxdb",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["null"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "sensors",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"sensors\" and\n r._field == \"value\" and\n r.label == \"Ambient\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"Ambient\")\n \n ",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["value"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "label",
+ "operator": "=",
+ "value": "Ambient"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ }
+ ],
+ "title": "Ambient temperature",
+ "tooltip": {
+ "show": true,
+ "showHistogram": false
+ },
+ "type": "heatmap",
+ "xAxis": {
+ "show": true
+ },
+ "xBucketNumber": null,
+ "xBucketSize": null,
+ "yAxis": {
+ "decimals": null,
+ "format": "celsius",
+ "logBase": 1,
+ "max": null,
+ "min": "0",
+ "show": true,
+ "splitFactor": null
+ },
+ "yBucketBound": "auto",
+ "yBucketNumber": null,
+ "yBucketSize": null
+ },
+ {
+ "cards": {
+ "cardPadding": null,
+ "cardRound": null
+ },
+ "color": {
+ "cardColor": "rgb(255, 0, 0)",
+ "colorScale": "sqrt",
+ "colorScheme": "interpolateOranges",
+ "exponent": 1,
+ "mode": "opacity"
+ },
+ "dataFormat": "timeseries",
+ "datasource": "${DS_GLANCES}",
+ "gridPos": {
+ "h": 6,
+ "w": 12,
+ "x": 12,
+ "y": 29
+ },
+ "heatmap": {},
+ "hideZeroBuckets": false,
+ "highlightCards": true,
+ "id": 23,
+ "legend": {
+ "show": false
+ },
+ "links": [],
+ "reverseYBuckets": false,
+ "targets": [
+ {
+ "alias": "CpuTemperature",
+ "dsType": "influxdb",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["null"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "sensors",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"sensors\" and\n r._field == \"value\" and\n r.label == \"CPU\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"Ambient\")\n \n ",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["value"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "label",
+ "operator": "=",
+ "value": "CPU"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ }
+ ],
+ "title": "CPU temperature",
+ "tooltip": {
+ "show": true,
+ "showHistogram": false
+ },
+ "type": "heatmap",
+ "xAxis": {
+ "show": true
+ },
+ "xBucketNumber": null,
+ "xBucketSize": null,
+ "yAxis": {
+ "decimals": null,
+ "format": "celsius",
+ "logBase": 1,
+ "max": null,
+ "min": "0",
+ "show": true,
+ "splitFactor": null
+ },
+ "yBucketBound": "auto",
+ "yBucketNumber": null,
+ "yBucketSize": null
+ },
+ {
+ "collapsed": false,
+ "datasource": null,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 35
+ },
+ "id": 37,
+ "panels": [],
+ "title": "Containers hosted on $host",
+ "type": "row"
+ },
+ {
+ "datasource": "${DS_GLANCES}",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 2,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "min": 0,
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "short"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "cpu_percent"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "#cca300",
+ "mode": "fixed"
+ }
+ },
+ {
+ "id": "unit",
+ "value": "percent"
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "memory_usage"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "#2f575e",
+ "mode": "fixed"
+ }
+ },
+ {
+ "id": "unit",
+ "value": "decbytes"
+ },
+ {
+ "id": "custom.fillOpacity",
+ "value": 36
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 24,
+ "x": 0,
+ "y": 36
+ },
+ "id": 25,
+ "links": [],
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.2.5",
+ "repeat": "container",
+ "repeatDirection": "v",
+ "targets": [
+ {
+ "alias": "MEM",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "measurement": "containers",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"containers\" and\n r._field == \"memory_usage\" and\n r.name == \"${container}\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"MEM\")\n \n ",
+ "rawQuery": false,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["memory_usage"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "name",
+ "operator": "=~",
+ "value": "/^$container$/"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ },
+ {
+ "alias": "CPU%",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "measurement": "containers",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "from(bucket: \"glances\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"containers\" and\n r._field == \"cpu_percent\" and\n r.name == \"${container}\" and\n r.hostname == \"${host}\"\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"CPU%\")\n \n ",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["cpu_percent"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "name",
+ "operator": "=~",
+ "value": "/^$container$/"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "$container container",
+ "type": "timeseries"
+ }
+ ],
+ "refresh": "5s",
+ "schemaVersion": 32,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "allValue": null,
+ "current": {},
+ "datasource": "${DS_GLANCES}",
+ "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"hostname\",\n predicate: (r) => true,\n start: -1d\n)",
+ "description": null,
+ "error": null,
+ "hide": 0,
+ "includeAll": false,
+ "label": null,
+ "multi": false,
+ "name": "host",
+ "options": [],
+ "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"hostname\",\n predicate: (r) => true,\n start: -1d\n)",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "tagValuesQuery": "",
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "allValue": null,
+ "current": {},
+ "datasource": "${DS_GLANCES}",
+ "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"name\",\n predicate: (r) => true,\n start: -1d\n)",
+ "description": null,
+ "error": null,
+ "hide": 0,
+ "includeAll": true,
+ "label": null,
+ "multi": true,
+ "name": "container",
+ "options": [],
+ "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"name\",\n predicate: (r) => true,\n start: -1d\n)",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 1,
+ "tagValuesQuery": "",
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "allValue": null,
+ "current": {},
+ "datasource": "${DS_GLANCES}",
+ "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"interface_name\",\n predicate: (r) => true,\n start: -1d\n)",
+ "description": null,
+ "error": null,
+ "hide": 0,
+ "includeAll": false,
+ "label": null,
+ "multi": false,
+ "name": "interface",
+ "options": [],
+ "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"interface_name\",\n predicate: (r) => true,\n start: -1d\n)",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 1,
+ "tagValuesQuery": "",
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "allValue": null,
+ "current": {},
+ "datasource": "${DS_GLANCES}",
+ "definition": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"disk_name\",\n predicate: (r) => true,\n start: -1d\n)",
+ "description": null,
+ "error": null,
+ "hide": 0,
+ "includeAll": false,
+ "label": null,
+ "multi": false,
+ "name": "disk",
+ "options": [],
+ "query": "import \"influxdata/influxdb/v1\"\nv1.tagValues(\n bucket: v.bucket,\n tag: \"disk_name\",\n predicate: (r) => true,\n start: -1d\n)",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 1,
+ "tagValuesQuery": "",
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ }
+ ]
+ },
+ "time": {
+ "from": "now-1h",
+ "to": "now"
+ },
+ "timepicker": {
+ "collapse": false,
+ "enable": true,
+ "notice": false,
+ "now": true,
+ "refresh_intervals": [
+ "5s",
+ "10s",
+ "30s",
+ "1m",
+ "5m",
+ "15m",
+ "30m",
+ "1h",
+ "2h",
+ "1d"
+ ],
+ "status": "Stable",
+ "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"],
+ "type": "timepicker"
+ },
+ "timezone": "browser",
+ "title": "Glances For FLUX",
+ "uid": "ESYAe0tnk",
+ "version": 21
}
diff --git a/conf/glances-grafana-influxql.json b/conf/glances-grafana-influxql.json
index 36b56d5e..e4e70c6e 100644
--- a/conf/glances-grafana-influxql.json
+++ b/conf/glances-grafana-influxql.json
@@ -1,2821 +1,2655 @@
{
- "__inputs": [
- {
- "name": "DS_GLANCES",
- "label": "glances",
- "description": "",
- "type": "datasource",
- "pluginId": "influxdb",
- "pluginName": "InfluxDB"
- },
- {
- "name": "DS_LSAT1",
- "label": "lsat1",
- "description": "",
- "type": "datasource",
- "pluginId": "influxdb",
- "pluginName": "InfluxDB"
- }
- ],
- "__elements": {},
- "__requires": [
- {
- "type": "grafana",
- "id": "grafana",
- "name": "Grafana",
- "version": "10.4.1"
- },
- {
- "type": "datasource",
- "id": "influxdb",
- "name": "InfluxDB",
- "version": "1.0.0"
- },
- {
- "type": "panel",
- "id": "stat",
- "name": "Stat",
- "version": ""
- },
- {
- "type": "panel",
- "id": "text",
- "name": "Text",
- "version": ""
- },
- {
- "type": "panel",
- "id": "timeseries",
- "name": "Time series",
- "version": ""
- }
- ],
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": {
- "type": "datasource",
- "uid": "grafana"
- },
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "fiscalYearStartMonth": 0,
- "graphTooltip": 0,
- "id": null,
- "links": [],
- "panels": [
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "none"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 6,
- "w": 2,
- "x": 0,
- "y": 0
- },
- "id": 5,
- "maxDataPoints": 100,
- "options": {
- "colorMode": "none",
- "graphMode": "none",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "showPercentChange": false,
- "textMode": "auto",
- "wideLayout": true
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "column": "cpucore",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- }
- ],
- "measurement": "load",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"cpucore\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "cpucore"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "max"
- }
- ]
- ],
- "series": "load",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- }
- ],
- "title": "Core",
- "type": "stat"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisBorderShow": false,
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 10,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "insertNulls": false,
- "lineInterpolation": "linear",
- "lineWidth": 2,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "normal"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "short"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 6,
- "w": 20,
- "x": 2,
- "y": 0
- },
- "id": 4,
- "options": {
- "legend": {
- "calcs": [
- "mean",
- "max",
- "min"
- ],
- "displayMode": "table",
- "placement": "right",
- "showLegend": true
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "alias": "1min",
- "column": "min1",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "load",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"min1\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "min1"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "load",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": "randomWalk('random walk')"
- },
- {
- "alias": "5mins",
- "column": "min5",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "load",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"min5\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "min5"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "load",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": ""
- },
- {
- "alias": "15mins",
- "column": "min15",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "load",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"min15\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "min15"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "load",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": ""
- }
- ],
- "title": "Load",
- "type": "timeseries"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "rgb(31, 120, 193)",
- "mode": "fixed"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "none"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 6,
- "w": 2,
- "x": 22,
- "y": 0
- },
- "id": 18,
- "maxDataPoints": 100,
- "options": {
- "colorMode": "none",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "showPercentChange": false,
- "textMode": "auto",
- "wideLayout": true
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "column": "total",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- }
- ],
- "measurement": "processcount",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"total\") FROM \"$host.processcount\" WHERE $timeFilter GROUP BY time($interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "total"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "series": "processcount",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- }
- ],
- "title": "Processes",
- "type": "stat"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisBorderShow": false,
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "insertNulls": false,
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "percent"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 6
- },
- "id": 6,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom",
- "showLegend": true
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "alias": "User",
- "column": "user",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "cpu",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"user\") FROM \"$host.cpu\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "user"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "cpu",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- },
- {
- "alias": "System",
- "column": "system",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "cpu",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"system\") FROM \"$host.cpu\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "system"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "cpu",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": ""
- },
- {
- "alias": "IoWait",
- "column": "iowait",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "cpu",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"iowait\") FROM \"$host.cpu\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
- "refId": "C",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "iowait"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "cpu",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": ""
- }
- ],
- "title": "CPU (%)",
- "type": "timeseries"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisBorderShow": false,
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "insertNulls": false,
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "bytes"
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "Max"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "#BF1B00",
- "mode": "fixed"
- }
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 12,
- "y": 6
- },
- "id": 7,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom",
- "showLegend": true
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "alias": "Used",
- "column": "used",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "mem",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"used\") FROM \"mem\" WHERE (\"hostname\" =~ /^$host$/) AND $timeFilter GROUP BY time($__interval) fill(none)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "used"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "mem",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- },
- {
- "alias": "Max",
- "column": "total",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "mem",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"total\") FROM \"mem\" WHERE $timeFilter GROUP BY time($__interval) fill(none)",
- "rawQuery": false,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "total"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "mem",
- "tags": [
- {
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": ""
- }
- ],
- "title": "MEM",
- "type": "timeseries"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisBorderShow": false,
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 30,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "insertNulls": false,
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "bps"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 13
- },
- "id": 9,
- "options": {
- "legend": {
- "calcs": [
- "mean",
- "max",
- "min"
- ],
- "displayMode": "list",
- "placement": "bottom",
- "showLegend": true
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "alias": "In",
- "column": "enp0s25.rx",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "interval": "",
- "measurement": "$host.network",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"rx\")/mean(\"time_since_update\")*8 FROM \"network\" WHERE (\"hostname\" =~ /^$host$/) AND (\"interface_name\" =~ /^$interface$/) AND $timeFilter GROUP BY time($interval) fill(none)",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "eth0.rx"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "network",
- "tags": []
- },
- {
- "alias": "Out",
- "column": "eth0.tx*-1",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "$host.network",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"tx\")/mean(\"time_since_update\")*-8 FROM \"network\" WHERE (\"hostname\" =~ /^$host$/) AND (\"interface_name\" =~ /^$interface$/) AND $timeFilter GROUP BY time($interval) fill(none)",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "eth0.tx"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "network",
- "tags": [],
- "target": ""
- }
- ],
- "title": "$interface network interface",
- "type": "timeseries"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisBorderShow": false,
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "insertNulls": false,
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "bytes"
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "Max"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "#BF1B00",
- "mode": "fixed"
- }
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 12,
- "y": 13
- },
- "id": 8,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom",
- "showLegend": true
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "alias": "Used",
- "column": "used",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- }
- ],
- "measurement": "$host.memswap",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"used\") FROM \"memswap\" WHERE (\"hostname\" =~ /^$host$/) AND $timeFilter GROUP BY time($__interval) fill(none)",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "used"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "memswap",
- "tags": []
- },
- {
- "alias": "Max",
- "column": "total",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- }
- ],
- "measurement": "$host.memswap",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"total\") FROM \"memswap\" WHERE (\"hostname\" =~ /^$host$/) AND $timeFilter GROUP BY time($__interval) fill(none)",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "total"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "memswap",
- "tags": [],
- "target": ""
- }
- ],
- "title": "SWAP",
- "type": "timeseries"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisBorderShow": false,
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "insertNulls": false,
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "bytes"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 20
- },
- "id": 10,
- "options": {
- "legend": {
- "calcs": [
- "mean",
- "max",
- "min"
- ],
- "displayMode": "list",
- "placement": "bottom",
- "showLegend": true
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "alias": "Read",
- "column": "sda2.read_bytes",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "$host.diskio",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"read_bytes\")/mean(\"time_since_update\") FROM \"diskio\" WHERE (\"hostname\" =~ /^$host$/) AND (\"disk_name\" =~ /^$disk$/) AND $timeFilter GROUP BY time($__interval) fill(none)",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "sda2.read_bytes"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "diskio",
- "tags": []
- },
- {
- "alias": "Write",
- "column": "sda2.write_bytes",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "$host.diskio",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"write_bytes\")/mean(\"time_since_update\") FROM \"diskio\" WHERE (\"hostname\" =~ /^$host$/) AND (\"disk_name\" =~ /^$disk$/) AND $timeFilter GROUP BY time($__interval) fill(none)",
- "rawQuery": true,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "sda2.write_bytes"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "diskio",
- "tags": [],
- "target": ""
- }
- ],
- "title": "$disk disk IO",
- "type": "timeseries"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisBorderShow": false,
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "insertNulls": false,
- "lineInterpolation": "linear",
- "lineWidth": 3,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "bytes"
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "Max"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "#BF1B00",
- "mode": "fixed"
- }
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Used"
- },
- "properties": [
- {
- "id": "custom.fillOpacity",
- "value": 100
- },
- {
- "id": "custom.fillOpacity",
- "value": 80
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 7,
- "w": 8,
- "x": 12,
- "y": 20
- },
- "id": 11,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom",
- "showLegend": true
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "alias": "Used",
- "column": "\"/.used\"",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "fs",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"/.used\") FROM \"$host.fs\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "used"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "fs",
- "tags": [
- {
- "key": "mnt_point",
- "operator": "=",
- "value": "/"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- },
- {
- "alias": "Max",
- "column": "\"/.size\"",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "measurement": "fs",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"/.size\") FROM \"$host.fs\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "size"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "fs",
- "tags": [
- {
- "key": "mnt_point",
- "operator": "=",
- "value": "/"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ],
- "target": ""
- }
- ],
- "title": "/ Size",
- "type": "timeseries"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "rgba(71, 212, 59, 0.4)",
- "value": null
- },
- {
- "color": "rgba(245, 150, 40, 0.73)",
- "value": 70
- },
- {
- "color": "rgba(225, 40, 40, 0.59)",
- "value": 90
- }
- ]
- },
- "unit": "percent"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 2,
- "x": 20,
- "y": 20
- },
- "id": 16,
- "maxDataPoints": 100,
- "options": {
- "colorMode": "background",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "showPercentChange": false,
- "textMode": "auto",
- "wideLayout": true
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "column": "\"/.percent\"",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- }
- ],
- "measurement": "fs",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"/.percent\") FROM \"$host.fs\" WHERE $timeFilter GROUP BY time($interval)",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "percent"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "fs",
- "tags": [
- {
- "key": "mnt_point",
- "operator": "=",
- "value": "/"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- }
- ],
- "title": "/ used",
- "type": "stat"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [
- {
- "options": {
- "match": "null",
- "result": {
- "text": "N/A"
- }
- },
- "type": "special"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "rgba(71, 212, 59, 0.4)",
- "value": null
- },
- {
- "color": "rgba(245, 150, 40, 0.73)",
- "value": 70
- },
- {
- "color": "rgba(225, 40, 40, 0.59)",
- "value": 90
- }
- ]
- },
- "unit": "percent"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 2,
- "x": 22,
- "y": 20
- },
- "id": 17,
- "maxDataPoints": 100,
- "options": {
- "colorMode": "background",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "horizontal",
- "reduceOptions": {
- "calcs": [
- "mean"
- ],
- "fields": "",
- "values": false
- },
- "showPercentChange": false,
- "textMode": "auto",
- "wideLayout": true
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "column": "\"/home.percent\"",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "function": "mean",
- "groupBy": [
- {
- "params": [
- "auto"
- ],
- "type": "time"
- }
- ],
- "measurement": "fs",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"percent\") FROM \"fs\" WHERE (\"hostname\" =~ /^$host$/) AND (\"mnt_point\" = '/boot') AND $timeFilter GROUP BY time($__interval)",
- "rawQuery": true,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "percent"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "series": "fs",
- "tags": [
- {
- "key": "mnt_point",
- "operator": "=",
- "value": "/boot"
- }
- ]
- }
- ],
- "title": "/boot used",
- "type": "stat"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_LSAT1}"
- },
- "gridPos": {
- "h": 3,
- "w": 24,
- "x": 0,
- "y": 27
- },
- "id": 22,
- "options": {
- "code": {
- "language": "plaintext",
- "showLineNumbers": false,
- "showMiniMap": false
- },
- "content": "",
- "mode": "markdown"
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_LSAT1}"
- },
- "refId": "A"
- }
- ],
- "title": "Sensors",
- "type": "text"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "description": "",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisBorderShow": false,
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "insertNulls": false,
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "auto",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "fieldMinMax": false,
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "celsius"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 6,
- "w": 12,
- "x": 0,
- "y": 30
- },
- "id": 21,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom",
- "showLegend": true
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "alias": "$tag_label",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "label::tag"
- ],
- "type": "tag"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "sensors",
- "orderByTime": "ASC",
- "policy": "default",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- },
- {
- "condition": "AND",
- "key": "type",
- "operator": "=~",
- "value": "/^SensorType.CPU_TEMP$/"
- }
- ]
- }
- ],
- "title": "CPU temperature",
- "type": "timeseries"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "description": "",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisBorderShow": false,
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "insertNulls": false,
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "auto",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "fieldMinMax": false,
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "rotrpm"
- },
- "overrides": []
- },
- "gridPos": {
- "h": 6,
- "w": 12,
- "x": 12,
- "y": 30
- },
- "id": 32,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom",
- "showLegend": true
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "10.4.1",
- "targets": [
- {
- "alias": "$tag_label",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "dsType": "influxdb",
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "label::tag"
- ],
- "type": "tag"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "measurement": "sensors",
- "orderByTime": "ASC",
- "policy": "default",
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- },
- {
- "condition": "AND",
- "key": "type",
- "operator": "=~",
- "value": "/^SensorType.FAN_SPEED$/"
- }
- ]
- }
- ],
- "title": "FAN speed",
- "type": "timeseries"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_LSAT1}"
- },
- "editable": true,
- "error": false,
- "gridPos": {
- "h": 3,
- "w": 24,
- "x": 0,
- "y": 36
- },
- "id": 13,
- "options": {
- "code": {
- "language": "plaintext",
- "showLineNumbers": false,
- "showMiniMap": false
- },
- "content": "",
- "mode": "markdown"
- },
- "pluginVersion": "10.4.1",
- "style": {},
- "targets": [
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_LSAT1}"
- },
- "refId": "A"
- }
- ],
- "title": "Containers",
- "type": "text"
- },
- {
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisBorderShow": false,
- "axisCenteredZero": false,
- "axisColorMode": "text",
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "insertNulls": false,
- "lineInterpolation": "linear",
- "lineWidth": 2,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "never",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "min": 0,
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- },
- "unit": "short"
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "MEM"
- },
- "properties": [
- {
- "id": "unit",
- "value": "decbytes"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "$host.docker.mean"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "#ba43a9",
- "mode": "fixed"
- }
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "CPU%"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "#cca300",
- "mode": "fixed"
- }
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "MEM"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "#2f575e",
- "mode": "fixed"
- }
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "MEM"
- },
- "properties": [
- {
- "id": "unit",
- "value": "decbytes"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "MEM"
- },
- "properties": [
- {
- "id": "custom.fillOpacity",
- "value": 100
- },
- {
- "id": "custom.fillOpacity",
- "value": 80
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 8,
- "w": 24,
- "x": 0,
- "y": 39
- },
- "id": 25,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom",
- "showLegend": true
- },
- "tooltip": {
- "mode": "multi",
- "sort": "none"
- }
- },
- "pluginVersion": "10.4.1",
- "repeat": "container",
- "repeatDirection": "v",
- "targets": [
- {
- "alias": "CPU%",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "measurement": "containers",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"cpu_percent\") FROM \"$host.docker\" WHERE $timeFilter GROUP BY time($__interval) fill(none)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "cpu_percent"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "key": "name",
- "operator": "=~",
- "value": "/^$container$/"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- },
- {
- "alias": "MEM",
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "groupBy": [
- {
- "params": [
- "$__interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "none"
- ],
- "type": "fill"
- }
- ],
- "hide": false,
- "measurement": "containers",
- "orderByTime": "ASC",
- "policy": "default",
- "query": "SELECT mean(\"cpu_percent\") FROM \"$host.docker\" WHERE $timeFilter GROUP BY time($__interval) fill(none)",
- "rawQuery": false,
- "refId": "B",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "memory_usage"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "mean"
- }
- ]
- ],
- "tags": [
- {
- "key": "name",
- "operator": "=~",
- "value": "/^$container$/"
- },
- {
- "condition": "AND",
- "key": "hostname",
- "operator": "=~",
- "value": "/^$host$/"
- }
- ]
- }
- ],
- "title": "$container container",
- "type": "timeseries"
- }
- ],
- "refresh": "5s",
- "schemaVersion": 39,
- "tags": [],
- "templating": {
- "list": [
- {
- "current": {},
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "definition": "show tag values with key=\"hostname\"",
- "hide": 0,
- "includeAll": false,
- "multi": false,
- "name": "host",
- "options": [],
- "query": "show tag values with key=\"hostname\"",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "current": {},
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "definition": "show tag values with key=\"name\"",
- "hide": 0,
- "includeAll": true,
- "multi": true,
- "name": "container",
- "options": [],
- "query": "show tag values with key=\"name\"",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 1,
- "tagValuesQuery": "",
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "current": {},
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "definition": "show tag values with key=\"interface_name\"",
- "hide": 0,
- "includeAll": false,
- "multi": false,
- "name": "interface",
- "options": [],
- "query": "show tag values with key=\"interface_name\"",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 1,
- "tagValuesQuery": "",
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "current": {},
- "datasource": {
- "type": "influxdb",
- "uid": "${DS_GLANCES}"
- },
- "definition": "show tag values with key=\"disk_name\"",
- "hide": 0,
- "includeAll": false,
- "multi": false,
- "name": "disk",
- "options": [],
- "query": "show tag values with key=\"disk_name\"",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 1,
- "tagValuesQuery": "",
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "collapse": false,
- "enable": true,
- "notice": false,
- "now": true,
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "status": "Stable",
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ],
- "type": "timepicker"
- },
- "timezone": "browser",
- "title": "Glances",
- "uid": "000000002",
- "version": 5,
- "weekStart": ""
-}
\ No newline at end of file
+ "__inputs": [
+ {
+ "name": "DS_GLANCES",
+ "label": "glances",
+ "description": "",
+ "type": "datasource",
+ "pluginId": "influxdb",
+ "pluginName": "InfluxDB"
+ },
+ {
+ "name": "DS_LSAT1",
+ "label": "lsat1",
+ "description": "",
+ "type": "datasource",
+ "pluginId": "influxdb",
+ "pluginName": "InfluxDB"
+ }
+ ],
+ "__elements": {},
+ "__requires": [
+ {
+ "type": "grafana",
+ "id": "grafana",
+ "name": "Grafana",
+ "version": "10.4.1"
+ },
+ {
+ "type": "datasource",
+ "id": "influxdb",
+ "name": "InfluxDB",
+ "version": "1.0.0"
+ },
+ {
+ "type": "panel",
+ "id": "stat",
+ "name": "Stat",
+ "version": ""
+ },
+ {
+ "type": "panel",
+ "id": "text",
+ "name": "Text",
+ "version": ""
+ },
+ {
+ "type": "panel",
+ "id": "timeseries",
+ "name": "Time series",
+ "version": ""
+ }
+ ],
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "fiscalYearStartMonth": 0,
+ "graphTooltip": 0,
+ "id": null,
+ "links": [],
+ "panels": [
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [
+ {
+ "options": {
+ "match": "null",
+ "result": {
+ "text": "N/A"
+ }
+ },
+ "type": "special"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "none"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 2,
+ "x": 0,
+ "y": 0
+ },
+ "id": 5,
+ "maxDataPoints": 100,
+ "options": {
+ "colorMode": "none",
+ "graphMode": "none",
+ "justifyMode": "auto",
+ "orientation": "horizontal",
+ "reduceOptions": {
+ "calcs": ["mean"],
+ "fields": "",
+ "values": false
+ },
+ "showPercentChange": false,
+ "textMode": "auto",
+ "wideLayout": true
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "column": "cpucore",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ }
+ ],
+ "measurement": "load",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"cpucore\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval)",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["cpucore"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "max"
+ }
+ ]
+ ],
+ "series": "load",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ }
+ ],
+ "title": "Core",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 2,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "normal"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "short"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 20,
+ "x": 2,
+ "y": 0
+ },
+ "id": 4,
+ "options": {
+ "legend": {
+ "calcs": ["mean", "max", "min"],
+ "displayMode": "table",
+ "placement": "right",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "alias": "1min",
+ "column": "min1",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "load",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"min1\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["min1"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "load",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": "randomWalk('random walk')"
+ },
+ {
+ "alias": "5mins",
+ "column": "min5",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "load",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"min5\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["min5"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "load",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": ""
+ },
+ {
+ "alias": "15mins",
+ "column": "min15",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "load",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"min15\") FROM \"$host.load\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
+ "refId": "C",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["min15"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "load",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": ""
+ }
+ ],
+ "title": "Load",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "rgb(31, 120, 193)",
+ "mode": "fixed"
+ },
+ "mappings": [
+ {
+ "options": {
+ "match": "null",
+ "result": {
+ "text": "N/A"
+ }
+ },
+ "type": "special"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "none"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 2,
+ "x": 22,
+ "y": 0
+ },
+ "id": 18,
+ "maxDataPoints": 100,
+ "options": {
+ "colorMode": "none",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "horizontal",
+ "reduceOptions": {
+ "calcs": ["mean"],
+ "fields": "",
+ "values": false
+ },
+ "showPercentChange": false,
+ "textMode": "auto",
+ "wideLayout": true
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "column": "total",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ }
+ ],
+ "measurement": "processcount",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"total\") FROM \"$host.processcount\" WHERE $timeFilter GROUP BY time($interval)",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["total"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "last"
+ }
+ ]
+ ],
+ "series": "processcount",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ }
+ ],
+ "title": "Processes",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "percent"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 0,
+ "y": 6
+ },
+ "id": 6,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "alias": "User",
+ "column": "user",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "cpu",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"user\") FROM \"$host.cpu\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["user"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "cpu",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ },
+ {
+ "alias": "System",
+ "column": "system",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "cpu",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"system\") FROM \"$host.cpu\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["system"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "cpu",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": ""
+ },
+ {
+ "alias": "IoWait",
+ "column": "iowait",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "cpu",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"iowait\") FROM \"$host.cpu\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
+ "refId": "C",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["iowait"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "cpu",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": ""
+ }
+ ],
+ "title": "CPU (%)",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "min": 0,
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Max"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "#BF1B00",
+ "mode": "fixed"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 12,
+ "y": 6
+ },
+ "id": 7,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "alias": "Used",
+ "column": "used",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "mem",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"used\") FROM \"mem\" WHERE (\"hostname\" =~ /^$host$/) AND $timeFilter GROUP BY time($__interval) fill(none)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["used"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "mem",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ },
+ {
+ "alias": "Max",
+ "column": "total",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "mem",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"total\") FROM \"mem\" WHERE $timeFilter GROUP BY time($__interval) fill(none)",
+ "rawQuery": false,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["total"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "mem",
+ "tags": [
+ {
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": ""
+ }
+ ],
+ "title": "MEM",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 30,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bps"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 0,
+ "y": 13
+ },
+ "id": 9,
+ "options": {
+ "legend": {
+ "calcs": ["mean", "max", "min"],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "alias": "In",
+ "column": "enp0s25.rx",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["null"],
+ "type": "fill"
+ }
+ ],
+ "interval": "",
+ "measurement": "$host.network",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"rx\")/mean(\"time_since_update\")*8 FROM \"network\" WHERE (\"hostname\" =~ /^$host$/) AND (\"interface_name\" =~ /^$interface$/) AND $timeFilter GROUP BY time($interval) fill(none)",
+ "rawQuery": true,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["eth0.rx"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "network",
+ "tags": []
+ },
+ {
+ "alias": "Out",
+ "column": "eth0.tx*-1",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["null"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "$host.network",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"tx\")/mean(\"time_since_update\")*-8 FROM \"network\" WHERE (\"hostname\" =~ /^$host$/) AND (\"interface_name\" =~ /^$interface$/) AND $timeFilter GROUP BY time($interval) fill(none)",
+ "rawQuery": true,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["eth0.tx"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "network",
+ "tags": [],
+ "target": ""
+ }
+ ],
+ "title": "$interface network interface",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "min": 0,
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Max"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "#BF1B00",
+ "mode": "fixed"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 12,
+ "y": 13
+ },
+ "id": 8,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "alias": "Used",
+ "column": "used",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ }
+ ],
+ "measurement": "$host.memswap",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"used\") FROM \"memswap\" WHERE (\"hostname\" =~ /^$host$/) AND $timeFilter GROUP BY time($__interval) fill(none)",
+ "rawQuery": true,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["used"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "memswap",
+ "tags": []
+ },
+ {
+ "alias": "Max",
+ "column": "total",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ }
+ ],
+ "measurement": "$host.memswap",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"total\") FROM \"memswap\" WHERE (\"hostname\" =~ /^$host$/) AND $timeFilter GROUP BY time($__interval) fill(none)",
+ "rawQuery": true,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["total"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "memswap",
+ "tags": [],
+ "target": ""
+ }
+ ],
+ "title": "SWAP",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 12,
+ "x": 0,
+ "y": 20
+ },
+ "id": 10,
+ "options": {
+ "legend": {
+ "calcs": ["mean", "max", "min"],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "alias": "Read",
+ "column": "sda2.read_bytes",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "$host.diskio",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"read_bytes\")/mean(\"time_since_update\") FROM \"diskio\" WHERE (\"hostname\" =~ /^$host$/) AND (\"disk_name\" =~ /^$disk$/) AND $timeFilter GROUP BY time($__interval) fill(none)",
+ "rawQuery": true,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["sda2.read_bytes"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "diskio",
+ "tags": []
+ },
+ {
+ "alias": "Write",
+ "column": "sda2.write_bytes",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "$host.diskio",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"write_bytes\")/mean(\"time_since_update\") FROM \"diskio\" WHERE (\"hostname\" =~ /^$host$/) AND (\"disk_name\" =~ /^$disk$/) AND $timeFilter GROUP BY time($__interval) fill(none)",
+ "rawQuery": true,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["sda2.write_bytes"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "diskio",
+ "tags": [],
+ "target": ""
+ }
+ ],
+ "title": "$disk disk IO",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 3,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "min": 0,
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "bytes"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Max"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "#BF1B00",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Used"
+ },
+ "properties": [
+ {
+ "id": "custom.fillOpacity",
+ "value": 100
+ },
+ {
+ "id": "custom.fillOpacity",
+ "value": 80
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 8,
+ "x": 12,
+ "y": 20
+ },
+ "id": 11,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "alias": "Used",
+ "column": "\"/.used\"",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "fs",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"/.used\") FROM \"$host.fs\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["used"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "fs",
+ "tags": [
+ {
+ "key": "mnt_point",
+ "operator": "=",
+ "value": "/"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ },
+ {
+ "alias": "Max",
+ "column": "\"/.size\"",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "fs",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"/.size\") FROM \"$host.fs\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["size"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "fs",
+ "tags": [
+ {
+ "key": "mnt_point",
+ "operator": "=",
+ "value": "/"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ],
+ "target": ""
+ }
+ ],
+ "title": "/ Size",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [
+ {
+ "options": {
+ "match": "null",
+ "result": {
+ "text": "N/A"
+ }
+ },
+ "type": "special"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "rgba(71, 212, 59, 0.4)",
+ "value": null
+ },
+ {
+ "color": "rgba(245, 150, 40, 0.73)",
+ "value": 70
+ },
+ {
+ "color": "rgba(225, 40, 40, 0.59)",
+ "value": 90
+ }
+ ]
+ },
+ "unit": "percent"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 2,
+ "x": 20,
+ "y": 20
+ },
+ "id": 16,
+ "maxDataPoints": 100,
+ "options": {
+ "colorMode": "background",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "horizontal",
+ "reduceOptions": {
+ "calcs": ["mean"],
+ "fields": "",
+ "values": false
+ },
+ "showPercentChange": false,
+ "textMode": "auto",
+ "wideLayout": true
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "column": "\"/.percent\"",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ }
+ ],
+ "measurement": "fs",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"/.percent\") FROM \"$host.fs\" WHERE $timeFilter GROUP BY time($interval)",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["percent"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "fs",
+ "tags": [
+ {
+ "key": "mnt_point",
+ "operator": "=",
+ "value": "/"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ }
+ ],
+ "title": "/ used",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [
+ {
+ "options": {
+ "match": "null",
+ "result": {
+ "text": "N/A"
+ }
+ },
+ "type": "special"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "rgba(71, 212, 59, 0.4)",
+ "value": null
+ },
+ {
+ "color": "rgba(245, 150, 40, 0.73)",
+ "value": 70
+ },
+ {
+ "color": "rgba(225, 40, 40, 0.59)",
+ "value": 90
+ }
+ ]
+ },
+ "unit": "percent"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 2,
+ "x": 22,
+ "y": 20
+ },
+ "id": 17,
+ "maxDataPoints": 100,
+ "options": {
+ "colorMode": "background",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "horizontal",
+ "reduceOptions": {
+ "calcs": ["mean"],
+ "fields": "",
+ "values": false
+ },
+ "showPercentChange": false,
+ "textMode": "auto",
+ "wideLayout": true
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "column": "\"/home.percent\"",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "function": "mean",
+ "groupBy": [
+ {
+ "params": ["auto"],
+ "type": "time"
+ }
+ ],
+ "measurement": "fs",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"percent\") FROM \"fs\" WHERE (\"hostname\" =~ /^$host$/) AND (\"mnt_point\" = '/boot') AND $timeFilter GROUP BY time($__interval)",
+ "rawQuery": true,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["percent"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "series": "fs",
+ "tags": [
+ {
+ "key": "mnt_point",
+ "operator": "=",
+ "value": "/boot"
+ }
+ ]
+ }
+ ],
+ "title": "/boot used",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_LSAT1}"
+ },
+ "gridPos": {
+ "h": 3,
+ "w": 24,
+ "x": 0,
+ "y": 27
+ },
+ "id": 22,
+ "options": {
+ "code": {
+ "language": "plaintext",
+ "showLineNumbers": false,
+ "showMiniMap": false
+ },
+ "content": "",
+ "mode": "markdown"
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_LSAT1}"
+ },
+ "refId": "A"
+ }
+ ],
+ "title": "Sensors",
+ "type": "text"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "fieldMinMax": false,
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "celsius"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 12,
+ "x": 0,
+ "y": 30
+ },
+ "id": 21,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "alias": "$tag_label",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["label::tag"],
+ "type": "tag"
+ },
+ {
+ "params": ["null"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "sensors",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["value"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ },
+ {
+ "condition": "AND",
+ "key": "type",
+ "operator": "=~",
+ "value": "/^SensorType.CPU_TEMP$/"
+ }
+ ]
+ }
+ ],
+ "title": "CPU temperature",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "fieldMinMax": false,
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "rotrpm"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 12,
+ "x": 12,
+ "y": 30
+ },
+ "id": 32,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "pluginVersion": "10.4.1",
+ "targets": [
+ {
+ "alias": "$tag_label",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "dsType": "influxdb",
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["label::tag"],
+ "type": "tag"
+ },
+ {
+ "params": ["null"],
+ "type": "fill"
+ }
+ ],
+ "measurement": "sensors",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["value"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ },
+ {
+ "condition": "AND",
+ "key": "type",
+ "operator": "=~",
+ "value": "/^SensorType.FAN_SPEED$/"
+ }
+ ]
+ }
+ ],
+ "title": "FAN speed",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_LSAT1}"
+ },
+ "editable": true,
+ "error": false,
+ "gridPos": {
+ "h": 3,
+ "w": 24,
+ "x": 0,
+ "y": 36
+ },
+ "id": 13,
+ "options": {
+ "code": {
+ "language": "plaintext",
+ "showLineNumbers": false,
+ "showMiniMap": false
+ },
+ "content": "",
+ "mode": "markdown"
+ },
+ "pluginVersion": "10.4.1",
+ "style": {},
+ "targets": [
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_LSAT1}"
+ },
+ "refId": "A"
+ }
+ ],
+ "title": "Containers",
+ "type": "text"
+ },
+ {
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisBorderShow": false,
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 0,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "insertNulls": false,
+ "lineInterpolation": "linear",
+ "lineWidth": 2,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "min": 0,
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ },
+ "unit": "short"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "MEM"
+ },
+ "properties": [
+ {
+ "id": "unit",
+ "value": "decbytes"
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "$host.docker.mean"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "#ba43a9",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "CPU%"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "#cca300",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "MEM"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "#2f575e",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "MEM"
+ },
+ "properties": [
+ {
+ "id": "unit",
+ "value": "decbytes"
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "MEM"
+ },
+ "properties": [
+ {
+ "id": "custom.fillOpacity",
+ "value": 100
+ },
+ {
+ "id": "custom.fillOpacity",
+ "value": 80
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 24,
+ "x": 0,
+ "y": 39
+ },
+ "id": 25,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "none"
+ }
+ },
+ "pluginVersion": "10.4.1",
+ "repeat": "container",
+ "repeatDirection": "v",
+ "targets": [
+ {
+ "alias": "CPU%",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "measurement": "containers",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"cpu_percent\") FROM \"$host.docker\" WHERE $timeFilter GROUP BY time($__interval) fill(none)",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["cpu_percent"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "name",
+ "operator": "=~",
+ "value": "/^$container$/"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ },
+ {
+ "alias": "MEM",
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "groupBy": [
+ {
+ "params": ["$__interval"],
+ "type": "time"
+ },
+ {
+ "params": ["none"],
+ "type": "fill"
+ }
+ ],
+ "hide": false,
+ "measurement": "containers",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT mean(\"cpu_percent\") FROM \"$host.docker\" WHERE $timeFilter GROUP BY time($__interval) fill(none)",
+ "rawQuery": false,
+ "refId": "B",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": ["memory_usage"],
+ "type": "field"
+ },
+ {
+ "params": [],
+ "type": "mean"
+ }
+ ]
+ ],
+ "tags": [
+ {
+ "key": "name",
+ "operator": "=~",
+ "value": "/^$container$/"
+ },
+ {
+ "condition": "AND",
+ "key": "hostname",
+ "operator": "=~",
+ "value": "/^$host$/"
+ }
+ ]
+ }
+ ],
+ "title": "$container container",
+ "type": "timeseries"
+ }
+ ],
+ "refresh": "5s",
+ "schemaVersion": 39,
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "current": {},
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "definition": "show tag values with key=\"hostname\"",
+ "hide": 0,
+ "includeAll": false,
+ "multi": false,
+ "name": "host",
+ "options": [],
+ "query": "show tag values with key=\"hostname\"",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "tagValuesQuery": "",
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "current": {},
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "definition": "show tag values with key=\"name\"",
+ "hide": 0,
+ "includeAll": true,
+ "multi": true,
+ "name": "container",
+ "options": [],
+ "query": "show tag values with key=\"name\"",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 1,
+ "tagValuesQuery": "",
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "current": {},
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "definition": "show tag values with key=\"interface_name\"",
+ "hide": 0,
+ "includeAll": false,
+ "multi": false,
+ "name": "interface",
+ "options": [],
+ "query": "show tag values with key=\"interface_name\"",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 1,
+ "tagValuesQuery": "",
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "current": {},
+ "datasource": {
+ "type": "influxdb",
+ "uid": "${DS_GLANCES}"
+ },
+ "definition": "show tag values with key=\"disk_name\"",
+ "hide": 0,
+ "includeAll": false,
+ "multi": false,
+ "name": "disk",
+ "options": [],
+ "query": "show tag values with key=\"disk_name\"",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 1,
+ "tagValuesQuery": "",
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ }
+ ]
+ },
+ "time": {
+ "from": "now-1h",
+ "to": "now"
+ },
+ "timepicker": {
+ "collapse": false,
+ "enable": true,
+ "notice": false,
+ "now": true,
+ "refresh_intervals": [
+ "5s",
+ "10s",
+ "30s",
+ "1m",
+ "5m",
+ "15m",
+ "30m",
+ "1h",
+ "2h",
+ "1d"
+ ],
+ "status": "Stable",
+ "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"],
+ "type": "timepicker"
+ },
+ "timezone": "browser",
+ "title": "Glances",
+ "uid": "000000002",
+ "version": 5,
+ "weekStart": ""
+}
diff --git a/docker-files/docker-logger.json b/docker-files/docker-logger.json
index d3ccceda..113158b8 100644
--- a/docker-files/docker-logger.json
+++ b/docker-files/docker-logger.json
@@ -1,22 +1,24 @@
{
- "version": 1,
- "disable_existing_loggers": "False",
- "root": {"level": "INFO", "handlers": ["console"]},
- "formatters": {
- "standard": {"format": "%(asctime)s -- %(levelname)s -- %(message)s"},
- "short": {"format": "%(levelname)s -- %(message)s"},
- "long": {"format": "%(asctime)s -- %(levelname)s -- %(message)s (%(funcName)s in %(filename)s)"},
- "free": {"format": "%(message)s"}
- },
- "handlers": {
- "console": {"class": "logging.StreamHandler", "formatter": "standard"}
- },
- "loggers": {
- "debug": {"handlers": ["console"], "level": "DEBUG"},
- "verbose": {"handlers": ["console"], "level": "INFO"},
- "standard": {"handlers": ["console"], "level": "INFO"},
- "requests": {"handlers": ["console"], "level": "ERROR"},
- "elasticsearch": {"handlers": ["console"], "level": "ERROR"},
- "elasticsearch.trace": {"handlers": ["console"], "level": "ERROR"}
- }
-}
\ No newline at end of file
+ "version": 1,
+ "disable_existing_loggers": "False",
+ "root": { "level": "INFO", "handlers": ["console"] },
+ "formatters": {
+ "standard": { "format": "%(asctime)s -- %(levelname)s -- %(message)s" },
+ "short": { "format": "%(levelname)s -- %(message)s" },
+ "long": {
+ "format": "%(asctime)s -- %(levelname)s -- %(message)s (%(funcName)s in %(filename)s)"
+ },
+ "free": { "format": "%(message)s" }
+ },
+ "handlers": {
+ "console": { "class": "logging.StreamHandler", "formatter": "standard" }
+ },
+ "loggers": {
+ "debug": { "handlers": ["console"], "level": "DEBUG" },
+ "verbose": { "handlers": ["console"], "level": "INFO" },
+ "standard": { "handlers": ["console"], "level": "INFO" },
+ "requests": { "handlers": ["console"], "level": "ERROR" },
+ "elasticsearch": { "handlers": ["console"], "level": "ERROR" },
+ "elasticsearch.trace": { "handlers": ["console"], "level": "ERROR" }
+ }
+}
diff --git a/docs/api/openapi.json b/docs/api/openapi.json
index ac06893f..7d252361 100644
--- a/docs/api/openapi.json
+++ b/docs/api/openapi.json
@@ -1 +1,923 @@
-{"openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {"/api/4/status": {"get": {"summary": " Api Status", "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\nThis entry point should be used to check the API health.\n\nSee related issue: Web server health check endpoint #1988", "operationId": "_api_status_api_4_status_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}, "head": {"summary": " Api Status", "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\nThis entry point should be used to check the API health.\n\nSee related issue: Web server health check endpoint #1988", "operationId": "_api_status_api_4_status_head", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/events/clear/warning": {"post": {"summary": " Events Clear Warning", "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\n\nIt's a post message to clean warning events", "operationId": "_events_clear_warning_api_4_events_clear_warning_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/events/clear/all": {"post": {"summary": " Events Clear All", "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\n\nIt's a post message to clean all events", "operationId": "_events_clear_all_api_4_events_clear_all_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/processes/extended/disable": {"post": {"summary": " Api Disable Extended Processes", "description": "Glances API RESTful implementation.\n\nDisable extended process stats\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error", "operationId": "_api_disable_extended_processes_api_4_processes_extended_disable_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/processes/extended/{pid}": {"post": {"summary": " Api Set Extended Processes", "description": "Glances API RESTful implementation.\n\nSet the extended process stats for the given PID\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error", "operationId": "_api_set_extended_processes_api_4_processes_extended__pid__post", "parameters": [{"name": "pid", "in": "path", "required": true, "schema": {"type": "string", "title": "Pid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/config": {"get": {"summary": " Api Config", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances configuration file\nHTTP/200 if OK\nHTTP/404 if others error", "operationId": "_api_config_api_4_config_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/config/{section}": {"get": {"summary": " Api Config Section", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances configuration section\nHTTP/200 if OK\nHTTP/400 if item is not found\nHTTP/404 if others error", "operationId": "_api_config_section_api_4_config__section__get", "parameters": [{"name": "section", "in": "path", "required": true, "schema": {"type": "string", "title": "Section"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/config/{section}/{item}": {"get": {"summary": " Api Config Section Item", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances configuration section/item\nHTTP/200 if OK\nHTTP/400 if item is not found\nHTTP/404 if others error", "operationId": "_api_config_section_item_api_4_config__section___item__get", "parameters": [{"name": "section", "in": "path", "required": true, "schema": {"type": "string", "title": "Section"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/args": {"get": {"summary": " Api Args", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances command line arguments\nHTTP/200 if OK\nHTTP/404 if others error", "operationId": "_api_args_api_4_args_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/args/{item}": {"get": {"summary": " Api Args Item", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances command line arguments item\nHTTP/200 if OK\nHTTP/400 if item is not found\nHTTP/404 if others error", "operationId": "_api_args_item_api_4_args__item__get", "parameters": [{"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/help": {"get": {"summary": " Api Help", "description": "Glances API RESTful implementation.\n\nReturn the help data or 404 error.", "operationId": "_api_help_api_4_help_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/all": {"get": {"summary": " Api All", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of all the plugins\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_all_api_4_all_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/all/limits": {"get": {"summary": " Api All Limits", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of all the plugins limits\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_all_limits_api_4_all_limits_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/all/views": {"get": {"summary": " Api All Views", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of all the plugins views\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_all_views_api_4_all_views_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/pluginslist": {"get": {"summary": " Api Plugins", "description": "Glances API RESTFul implementation.\n\n@api {get} /api/%s/pluginslist Get plugins list\n@apiVersion 2.0\n@apiName pluginslist\n@apiGroup plugin\n\n@apiSuccess {String[]} Plugins list.\n\n@apiSuccessExample Success-Response:\n HTTP/1.1 200 OK\n [\n \"load\",\n \"help\",\n \"ip\",\n \"memswap\",\n \"processlist\",\n ...\n ]\n\n @apiError Cannot get plugin list.\n\n @apiErrorExample Error-Response:\n HTTP/1.1 404 Not Found", "operationId": "_api_plugins_api_4_pluginslist_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/serverslist": {"get": {"summary": " Api Servers List", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the servers list (for browser mode)\nHTTP/200 if OK", "operationId": "_api_servers_list_api_4_serverslist_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/processes/extended": {"get": {"summary": " Api Get Extended Processes", "description": "Glances API RESTful implementation.\n\nGet the extended process stats (if set before)\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error", "operationId": "_api_get_extended_processes_api_4_processes_extended_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/4/processes/{pid}": {"get": {"summary": " Api Get Processes", "description": "Glances API RESTful implementation.\n\nGet the process stats for the given PID\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error", "operationId": "_api_get_processes_api_4_processes__pid__get", "parameters": [{"name": "pid", "in": "path", "required": true, "schema": {"type": "string", "title": "Pid"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}": {"get": {"summary": " Api", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_api_4__plugin__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/history": {"get": {"summary": " Api History", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin history\nLimit to the last nb items (all if nb=0)\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_history_api_4__plugin__history_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "nb", "in": "query", "required": false, "schema": {"type": "integer", "default": 0, "title": "Nb"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/history/{nb}": {"get": {"summary": " Api History", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin history\nLimit to the last nb items (all if nb=0)\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_history_api_4__plugin__history__nb__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "nb", "in": "path", "required": true, "schema": {"type": "integer", "title": "Nb"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/top/{nb}": {"get": {"summary": " Api Top", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin limited to the top nb items.\nIt is used to reduce the payload of the HTTP response (example: processlist).\n\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_top_api_4__plugin__top__nb__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "nb", "in": "path", "required": true, "schema": {"type": "integer", "title": "Nb"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/limits": {"get": {"summary": " Api Limits", "description": "Glances API RESTful implementation.\n\nReturn the JSON limits of a given plugin\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_limits_api_4__plugin__limits_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/views": {"get": {"summary": " Api Views", "description": "Glances API RESTful implementation.\n\nReturn the JSON views of a given plugin\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_views_api_4__plugin__views_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}": {"get": {"summary": " Api Item", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_api_4__plugin___item__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/views": {"get": {"summary": " Api Item Views", "description": "Glances API RESTful implementation.\n\nReturn the JSON view representation of the couple plugin/item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_views_api_4__plugin___item__views_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/history": {"get": {"summary": " Api Item History", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/history of item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_history_api_4__plugin___item__history_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}, {"name": "nb", "in": "query", "required": false, "schema": {"type": "integer", "default": 0, "title": "Nb"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/history/{nb}": {"get": {"summary": " Api Item History", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/history of item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_history_api_4__plugin___item__history__nb__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}, {"name": "nb", "in": "path", "required": true, "schema": {"type": "integer", "title": "Nb"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/description": {"get": {"summary": " Api Item Description", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/item description\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_description_api_4__plugin___item__description_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/unit": {"get": {"summary": " Api Item Unit", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/item unit\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_item_unit_api_4__plugin___item__unit_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/value/{value}": {"get": {"summary": " Api Value", "description": "Glances API RESTful implementation.\n\nReturn the process stats (dict) for the given item=value\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_value_api_4__plugin___item__value__value__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}, {"name": "value", "in": "path", "required": true, "schema": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "number"}], "title": "Value"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/{key}": {"get": {"summary": " Api Key", "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of plugin/item/key\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_key_api_4__plugin___item___key__get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}, {"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/4/{plugin}/{item}/{key}/views": {"get": {"summary": " Api Key Views", "description": "Glances API RESTful implementation.\n\nReturn the JSON view representation of plugin/item/key\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error", "operationId": "_api_key_views_api_4__plugin___item___key__views_get", "parameters": [{"name": "plugin", "in": "path", "required": true, "schema": {"type": "string", "title": "Plugin"}}, {"name": "item", "in": "path", "required": true, "schema": {"type": "string", "title": "Item"}}, {"name": "key", "in": "path", "required": true, "schema": {"type": "string", "title": "Key"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/": {"get": {"summary": " Index", "description": "Return main index.html (/) file.\n\nParameters are available through the request object.\nExample: http://localhost:61208/?refresh=5\n\nNote: This function is only called the first time the page is loaded.", "operationId": "_index__get", "responses": {"200": {"description": "Successful Response", "content": {"text/html": {"schema": {"type": "string"}}}}}}}}, "components": {"schemas": {"HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}}}
\ No newline at end of file
+{
+ "openapi": "3.0.2",
+ "info": { "title": "FastAPI", "version": "0.1.0" },
+ "paths": {
+ "/api/4/status": {
+ "get": {
+ "summary": " Api Status",
+ "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\nThis entry point should be used to check the API health.\n\nSee related issue: Web server health check endpoint #1988",
+ "operationId": "_api_status_api_4_status_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ },
+ "head": {
+ "summary": " Api Status",
+ "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\nThis entry point should be used to check the API health.\n\nSee related issue: Web server health check endpoint #1988",
+ "operationId": "_api_status_api_4_status_head",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/events/clear/warning": {
+ "post": {
+ "summary": " Events Clear Warning",
+ "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\n\nIt's a post message to clean warning events",
+ "operationId": "_events_clear_warning_api_4_events_clear_warning_post",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/events/clear/all": {
+ "post": {
+ "summary": " Events Clear All",
+ "description": "Glances API RESTful implementation.\n\nReturn a 200 status code.\n\nIt's a post message to clean all events",
+ "operationId": "_events_clear_all_api_4_events_clear_all_post",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/processes/extended/disable": {
+ "post": {
+ "summary": " Api Disable Extended Processes",
+ "description": "Glances API RESTful implementation.\n\nDisable extended process stats\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error",
+ "operationId": "_api_disable_extended_processes_api_4_processes_extended_disable_post",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/processes/extended/{pid}": {
+ "post": {
+ "summary": " Api Set Extended Processes",
+ "description": "Glances API RESTful implementation.\n\nSet the extended process stats for the given PID\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error",
+ "operationId": "_api_set_extended_processes_api_4_processes_extended__pid__post",
+ "parameters": [
+ {
+ "name": "pid",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Pid" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/config": {
+ "get": {
+ "summary": " Api Config",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances configuration file\nHTTP/200 if OK\nHTTP/404 if others error",
+ "operationId": "_api_config_api_4_config_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/config/{section}": {
+ "get": {
+ "summary": " Api Config Section",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances configuration section\nHTTP/200 if OK\nHTTP/400 if item is not found\nHTTP/404 if others error",
+ "operationId": "_api_config_section_api_4_config__section__get",
+ "parameters": [
+ {
+ "name": "section",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Section" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/config/{section}/{item}": {
+ "get": {
+ "summary": " Api Config Section Item",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances configuration section/item\nHTTP/200 if OK\nHTTP/400 if item is not found\nHTTP/404 if others error",
+ "operationId": "_api_config_section_item_api_4_config__section___item__get",
+ "parameters": [
+ {
+ "name": "section",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Section" }
+ },
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/args": {
+ "get": {
+ "summary": " Api Args",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances command line arguments\nHTTP/200 if OK\nHTTP/404 if others error",
+ "operationId": "_api_args_api_4_args_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/args/{item}": {
+ "get": {
+ "summary": " Api Args Item",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the Glances command line arguments item\nHTTP/200 if OK\nHTTP/400 if item is not found\nHTTP/404 if others error",
+ "operationId": "_api_args_item_api_4_args__item__get",
+ "parameters": [
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/help": {
+ "get": {
+ "summary": " Api Help",
+ "description": "Glances API RESTful implementation.\n\nReturn the help data or 404 error.",
+ "operationId": "_api_help_api_4_help_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/all": {
+ "get": {
+ "summary": " Api All",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of all the plugins\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_all_api_4_all_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/all/limits": {
+ "get": {
+ "summary": " Api All Limits",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of all the plugins limits\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_all_limits_api_4_all_limits_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/all/views": {
+ "get": {
+ "summary": " Api All Views",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of all the plugins views\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_all_views_api_4_all_views_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/pluginslist": {
+ "get": {
+ "summary": " Api Plugins",
+ "description": "Glances API RESTFul implementation.\n\n@api {get} /api/%s/pluginslist Get plugins list\n@apiVersion 2.0\n@apiName pluginslist\n@apiGroup plugin\n\n@apiSuccess {String[]} Plugins list.\n\n@apiSuccessExample Success-Response:\n HTTP/1.1 200 OK\n [\n \"load\",\n \"help\",\n \"ip\",\n \"memswap\",\n \"processlist\",\n ...\n ]\n\n @apiError Cannot get plugin list.\n\n @apiErrorExample Error-Response:\n HTTP/1.1 404 Not Found",
+ "operationId": "_api_plugins_api_4_pluginslist_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/serverslist": {
+ "get": {
+ "summary": " Api Servers List",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the servers list (for browser mode)\nHTTP/200 if OK",
+ "operationId": "_api_servers_list_api_4_serverslist_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/processes/extended": {
+ "get": {
+ "summary": " Api Get Extended Processes",
+ "description": "Glances API RESTful implementation.\n\nGet the extended process stats (if set before)\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error",
+ "operationId": "_api_get_extended_processes_api_4_processes_extended_get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ }
+ }
+ }
+ },
+ "/api/4/processes/{pid}": {
+ "get": {
+ "summary": " Api Get Processes",
+ "description": "Glances API RESTful implementation.\n\nGet the process stats for the given PID\nHTTP/200 if OK\nHTTP/400 if PID is not found\nHTTP/404 if others error",
+ "operationId": "_api_get_processes_api_4_processes__pid__get",
+ "parameters": [
+ {
+ "name": "pid",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Pid" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}": {
+ "get": {
+ "summary": " Api",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_api_4__plugin__get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/history": {
+ "get": {
+ "summary": " Api History",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin history\nLimit to the last nb items (all if nb=0)\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_history_api_4__plugin__history_get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "nb",
+ "in": "query",
+ "required": false,
+ "schema": { "type": "integer", "default": 0, "title": "Nb" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/history/{nb}": {
+ "get": {
+ "summary": " Api History",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin history\nLimit to the last nb items (all if nb=0)\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_history_api_4__plugin__history__nb__get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "nb",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "integer", "title": "Nb" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/top/{nb}": {
+ "get": {
+ "summary": " Api Top",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of a given plugin limited to the top nb items.\nIt is used to reduce the payload of the HTTP response (example: processlist).\n\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_top_api_4__plugin__top__nb__get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "nb",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "integer", "title": "Nb" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/limits": {
+ "get": {
+ "summary": " Api Limits",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON limits of a given plugin\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_limits_api_4__plugin__limits_get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/views": {
+ "get": {
+ "summary": " Api Views",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON views of a given plugin\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_views_api_4__plugin__views_get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/{item}": {
+ "get": {
+ "summary": " Api Item",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_item_api_4__plugin___item__get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/{item}/views": {
+ "get": {
+ "summary": " Api Item Views",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON view representation of the couple plugin/item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_item_views_api_4__plugin___item__views_get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/{item}/history": {
+ "get": {
+ "summary": " Api Item History",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/history of item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_item_history_api_4__plugin___item__history_get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ },
+ {
+ "name": "nb",
+ "in": "query",
+ "required": false,
+ "schema": { "type": "integer", "default": 0, "title": "Nb" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/{item}/history/{nb}": {
+ "get": {
+ "summary": " Api Item History",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/history of item\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_item_history_api_4__plugin___item__history__nb__get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ },
+ {
+ "name": "nb",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "integer", "title": "Nb" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/{item}/description": {
+ "get": {
+ "summary": " Api Item Description",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/item description\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_item_description_api_4__plugin___item__description_get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/{item}/unit": {
+ "get": {
+ "summary": " Api Item Unit",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of the couple plugin/item unit\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_item_unit_api_4__plugin___item__unit_get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/{item}/value/{value}": {
+ "get": {
+ "summary": " Api Value",
+ "description": "Glances API RESTful implementation.\n\nReturn the process stats (dict) for the given item=value\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_value_api_4__plugin___item__value__value__get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ },
+ {
+ "name": "value",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "anyOf": [
+ { "type": "string" },
+ { "type": "integer" },
+ { "type": "number" }
+ ],
+ "title": "Value"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/{item}/{key}": {
+ "get": {
+ "summary": " Api Key",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON representation of plugin/item/key\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_key_api_4__plugin___item___key__get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ },
+ {
+ "name": "key",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Key" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/4/{plugin}/{item}/{key}/views": {
+ "get": {
+ "summary": " Api Key Views",
+ "description": "Glances API RESTful implementation.\n\nReturn the JSON view representation of plugin/item/key\nHTTP/200 if OK\nHTTP/400 if plugin is not found\nHTTP/404 if others error",
+ "operationId": "_api_key_views_api_4__plugin___item___key__views_get",
+ "parameters": [
+ {
+ "name": "plugin",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Plugin" }
+ },
+ {
+ "name": "item",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Item" }
+ },
+ {
+ "name": "key",
+ "in": "path",
+ "required": true,
+ "schema": { "type": "string", "title": "Key" }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "application/json": { "schema": {} } }
+ },
+ "422": {
+ "description": "Validation Error",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/HTTPValidationError" }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/": {
+ "get": {
+ "summary": " Index",
+ "description": "Return main index.html (/) file.\n\nParameters are available through the request object.\nExample: http://localhost:61208/?refresh=5\n\nNote: This function is only called the first time the page is loaded.",
+ "operationId": "_index__get",
+ "responses": {
+ "200": {
+ "description": "Successful Response",
+ "content": { "text/html": { "schema": { "type": "string" } } }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "HTTPValidationError": {
+ "properties": {
+ "detail": {
+ "items": { "$ref": "#/components/schemas/ValidationError" },
+ "type": "array",
+ "title": "Detail"
+ }
+ },
+ "type": "object",
+ "title": "HTTPValidationError"
+ },
+ "ValidationError": {
+ "properties": {
+ "loc": {
+ "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] },
+ "type": "array",
+ "title": "Location"
+ },
+ "msg": { "type": "string", "title": "Message" },
+ "type": { "type": "string", "title": "Error Type" }
+ },
+ "type": "object",
+ "required": ["loc", "msg", "type"],
+ "title": "ValidationError"
+ }
+ }
+ }
+}
diff --git a/docs/build.sh b/docs/build.sh
index 88ce0688..ba25b76c 100755
--- a/docs/build.sh
+++ b/docs/build.sh
@@ -1,2 +1,5 @@
+#!/bin/sh
+
+make clean
make html
LC_ALL=C make man
diff --git a/glances/outputs/static/.prettierrc.js b/glances/outputs/static/.prettierrc.js
index 980d090c..f4c18c07 100644
--- a/glances/outputs/static/.prettierrc.js
+++ b/glances/outputs/static/.prettierrc.js
@@ -1,10 +1,10 @@
module.exports = {
- printWidth: 100,
- arrowParens: 'always',
- bracketSpacing: true,
- semi: true,
- singleQuote: true,
- tabWidth: 4,
- trailingComma: 'none',
- useTabs: false
+ printWidth: 100,
+ arrowParens: "always",
+ bracketSpacing: true,
+ semi: true,
+ singleQuote: true,
+ tabWidth: 4,
+ trailingComma: "none",
+ useTabs: false,
};
diff --git a/glances/outputs/static/eslint.config.mjs b/glances/outputs/static/eslint.config.mjs
index 5f9c5553..15ec3901 100644
--- a/glances/outputs/static/eslint.config.mjs
+++ b/glances/outputs/static/eslint.config.mjs
@@ -1,29 +1,29 @@
-import eslint from '@eslint/js';
-import eslintConfigPrettier from 'eslint-config-prettier';
-import eslintPluginVue from 'eslint-plugin-vue';
-import globals from 'globals';
-import typescriptEslint from 'typescript-eslint';
+import eslint from "@eslint/js";
+import eslintConfigPrettier from "eslint-config-prettier";
+import eslintPluginVue from "eslint-plugin-vue";
+import globals from "globals";
+import typescriptEslint from "typescript-eslint";
export default typescriptEslint.config(
- { ignores: ['*.d.ts', '**/coverage', '**/dist'] },
- {
- extends: [
- eslint.configs.recommended,
- ...typescriptEslint.configs.recommended,
- ...eslintPluginVue.configs['flat/recommended'],
- ],
- files: ['**/*.{ts,vue}'],
- languageOptions: {
- ecmaVersion: 'latest',
- sourceType: 'module',
- globals: globals.browser,
- parserOptions: {
- parser: typescriptEslint.parser,
- },
- },
- rules: {
- // your rules
- },
- },
- eslintConfigPrettier
+ { ignores: ["*.d.ts", "**/coverage", "**/dist"] },
+ {
+ extends: [
+ eslint.configs.recommended,
+ ...typescriptEslint.configs.recommended,
+ ...eslintPluginVue.configs["flat/recommended"],
+ ],
+ files: ["**/*.{ts,vue}"],
+ languageOptions: {
+ ecmaVersion: "latest",
+ sourceType: "module",
+ globals: globals.browser,
+ parserOptions: {
+ parser: typescriptEslint.parser,
+ },
+ },
+ rules: {
+ // your rules
+ },
+ },
+ eslintConfigPrettier,
);
diff --git a/glances/outputs/static/js/App.vue b/glances/outputs/static/js/App.vue
index b62ebf54..79dffc23 100644
--- a/glances/outputs/static/js/App.vue
+++ b/glances/outputs/static/js/App.vue
@@ -90,329 +90,335 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/Browser.vue b/glances/outputs/static/js/Browser.vue
index 95eed02f..c41e19fe 100644
--- a/glances/outputs/static/js/Browser.vue
+++ b/glances/outputs/static/js/Browser.vue
@@ -56,54 +56,59 @@
// import { store } from './store.js';
export default {
- data() {
- return {
- servers: undefined,
- };
- },
- computed: {
- serversListLoaded() {
- return this.servers !== undefined;
- },
- },
- created() {
- this.updateServersList();
- },
- mounted() {
- const GLANCES = window.__GLANCES__ || {};
- const refreshTime = isFinite(GLANCES['refresh-time'])
- ? parseInt(GLANCES['refresh-time'], 10)
- : undefined;
- this.interval = setInterval(this.updateServersList, refreshTime * 1000)
- },
- unmounted() {
- clearInterval(this.interval)
- },
- methods: {
- updateServersList() {
- fetch('api/4/serverslist', { method: 'GET' })
- .then((response) => response.json())
- .then((response) => (this.servers = response));
- },
- formatNumber(value) {
- if (typeof value === "number" && !isNaN(value)) {
- return value.toFixed(1);
- }
- return value;
- },
- goToGlances(server) {
- if (server.protocol === 'rpc') {
- alert("You just click on a Glances RPC server.\nPlease open a terminal and enter the following command line:\n\nglances -c " + String(server.ip) + " -p " + String(server.port))
- } else {
- window.location.href = server.uri;
- }
- },
- getDecoration(server, column) {
- if (server[column + '_decoration'] === undefined) {
- return;
- }
- return server[column + '_decoration'].replace('_LOG', '').toLowerCase();
- }
- }
+ data() {
+ return {
+ servers: undefined,
+ };
+ },
+ computed: {
+ serversListLoaded() {
+ return this.servers !== undefined;
+ },
+ },
+ created() {
+ this.updateServersList();
+ },
+ mounted() {
+ const GLANCES = window.__GLANCES__ || {};
+ const refreshTime = isFinite(GLANCES["refresh-time"])
+ ? parseInt(GLANCES["refresh-time"], 10)
+ : undefined;
+ this.interval = setInterval(this.updateServersList, refreshTime * 1000);
+ },
+ unmounted() {
+ clearInterval(this.interval);
+ },
+ methods: {
+ updateServersList() {
+ fetch("api/4/serverslist", { method: "GET" })
+ .then((response) => response.json())
+ .then((response) => (this.servers = response));
+ },
+ formatNumber(value) {
+ if (typeof value === "number" && !isNaN(value)) {
+ return value.toFixed(1);
+ }
+ return value;
+ },
+ goToGlances(server) {
+ if (server.protocol === "rpc") {
+ alert(
+ "You just click on a Glances RPC server.\nPlease open a terminal and enter the following command line:\n\nglances -c " +
+ String(server.ip) +
+ " -p " +
+ String(server.port),
+ );
+ } else {
+ window.location.href = server.uri;
+ }
+ },
+ getDecoration(server, column) {
+ if (server[column + "_decoration"] === undefined) {
+ return;
+ }
+ return server[column + "_decoration"].replace("_LOG", "").toLowerCase();
+ },
+ },
};
\ No newline at end of file
diff --git a/glances/outputs/static/js/app.js b/glances/outputs/static/js/app.js
index b7001d21..c4be27a0 100644
--- a/glances/outputs/static/js/app.js
+++ b/glances/outputs/static/js/app.js
@@ -1,17 +1,17 @@
/* global module */
if (module.hot) {
- module.hot.accept();
+ module.hot.accept();
}
-import '../css/custom.scss';
-import '../css/style.scss';
+import "../css/custom.scss";
+import "../css/style.scss";
-import * as bootstrap from 'bootstrap';
+import * as bootstrap from "bootstrap";
-import { createApp } from 'vue';
-import App from './App.vue';
+import { createApp } from "vue";
+import App from "./App.vue";
import * as filters from "./filters.js";
const app = createApp(App);
app.config.globalProperties.$filters = filters;
-app.mount('#app');
+app.mount("#app");
diff --git a/glances/outputs/static/js/browser.js b/glances/outputs/static/js/browser.js
index de6b2226..ff794f26 100644
--- a/glances/outputs/static/js/browser.js
+++ b/glances/outputs/static/js/browser.js
@@ -1,17 +1,17 @@
/* global module */
if (module.hot) {
- module.hot.accept();
+ module.hot.accept();
}
-import '../css/custom.scss';
-import '../css/style.scss';
+import "../css/custom.scss";
+import "../css/style.scss";
-import * as bootstrap from 'bootstrap';
+import * as bootstrap from "bootstrap";
-import { createApp } from 'vue';
-import App from './Browser.vue';
+import { createApp } from "vue";
+import App from "./Browser.vue";
import * as filters from "./filters.js";
const app = createApp(App);
app.config.globalProperties.$filters = filters;
-app.mount('#browser');
+app.mount("#browser");
diff --git a/glances/outputs/static/js/components/help.vue b/glances/outputs/static/js/components/help.vue
index dde926bf..ec5edbf6 100644
--- a/glances/outputs/static/js/components/help.vue
+++ b/glances/outputs/static/js/components/help.vue
@@ -163,15 +163,15 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-alert.vue b/glances/outputs/static/js/components/plugin-alert.vue
index e8f6fdc9..807846dd 100644
--- a/glances/outputs/static/js/components/plugin-alert.vue
+++ b/glances/outputs/static/js/components/plugin-alert.vue
@@ -29,97 +29,110 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-amps.vue b/glances/outputs/static/js/components/plugin-amps.vue
index 0939ed7d..4595971b 100644
--- a/glances/outputs/static/js/components/plugin-amps.vue
+++ b/glances/outputs/static/js/components/plugin-amps.vue
@@ -28,42 +28,42 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-cloud.vue b/glances/outputs/static/js/components/plugin-cloud.vue
index 91ffd154..3f16cf34 100644
--- a/glances/outputs/static/js/components/plugin-cloud.vue
+++ b/glances/outputs/static/js/components/plugin-cloud.vue
@@ -6,24 +6,24 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-connections.vue b/glances/outputs/static/js/components/plugin-connections.vue
index 7bc69945..92756c52 100644
--- a/glances/outputs/static/js/components/plugin-connections.vue
+++ b/glances/outputs/static/js/components/plugin-connections.vue
@@ -37,44 +37,44 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-containers.vue b/glances/outputs/static/js/components/plugin-containers.vue
index bed2a9fd..07f1942f 100644
--- a/glances/outputs/static/js/components/plugin-containers.vue
+++ b/glances/outputs/static/js/components/plugin-containers.vue
@@ -177,122 +177,124 @@
diff --git a/glances/outputs/static/js/components/plugin-cpu.vue b/glances/outputs/static/js/components/plugin-cpu.vue
index 429b6b69..cf75e058 100644
--- a/glances/outputs/static/js/components/plugin-cpu.vue
+++ b/glances/outputs/static/js/components/plugin-cpu.vue
@@ -122,85 +122,89 @@ v-if="!isWindows && !isSunOS && soft_interrupts != undefined" scope="col"
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-diskio.vue b/glances/outputs/static/js/components/plugin-diskio.vue
index 33d20c9a..1c038577 100644
--- a/glances/outputs/static/js/components/plugin-diskio.vue
+++ b/glances/outputs/static/js/components/plugin-diskio.vue
@@ -46,71 +46,78 @@
diff --git a/glances/outputs/static/js/components/plugin-folders.vue b/glances/outputs/static/js/components/plugin-folders.vue
index e6aed1c6..de45a731 100644
--- a/glances/outputs/static/js/components/plugin-folders.vue
+++ b/glances/outputs/static/js/components/plugin-folders.vue
@@ -24,45 +24,51 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-fs.vue b/glances/outputs/static/js/components/plugin-fs.vue
index 8f8cf515..2521b03b 100644
--- a/glances/outputs/static/js/components/plugin-fs.vue
+++ b/glances/outputs/static/js/components/plugin-fs.vue
@@ -43,55 +43,55 @@ v-if="(fs.alias ? fs.alias : fs.mountPoint).length + fs.name.length <= 15"
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-gpu.vue b/glances/outputs/static/js/components/plugin-gpu.vue
index 6526a360..eee58e17 100644
--- a/glances/outputs/static/js/components/plugin-gpu.vue
+++ b/glances/outputs/static/js/components/plugin-gpu.vue
@@ -91,74 +91,74 @@ v-if="gpu.temperature != null" class="col text-end"
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-hostname.vue b/glances/outputs/static/js/components/plugin-hostname.vue
index 339b56c1..d45e945b 100644
--- a/glances/outputs/static/js/components/plugin-hostname.vue
+++ b/glances/outputs/static/js/components/plugin-hostname.vue
@@ -6,29 +6,29 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-ip.vue b/glances/outputs/static/js/components/plugin-ip.vue
index a81b4c16..59518a29 100644
--- a/glances/outputs/static/js/components/plugin-ip.vue
+++ b/glances/outputs/static/js/components/plugin-ip.vue
@@ -10,30 +10,30 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-irq.vue b/glances/outputs/static/js/components/plugin-irq.vue
index 31084590..84c6308e 100644
--- a/glances/outputs/static/js/components/plugin-irq.vue
+++ b/glances/outputs/static/js/components/plugin-irq.vue
@@ -19,23 +19,23 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-load.vue b/glances/outputs/static/js/components/plugin-load.vue
index 9494ae51..2e66216f 100644
--- a/glances/outputs/static/js/components/plugin-load.vue
+++ b/glances/outputs/static/js/components/plugin-load.vue
@@ -31,38 +31,38 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-mem.vue b/glances/outputs/static/js/components/plugin-mem.vue
index 65562adf..5267b312 100644
--- a/glances/outputs/static/js/components/plugin-mem.vue
+++ b/glances/outputs/static/js/components/plugin-mem.vue
@@ -83,69 +83,71 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-memswap.vue b/glances/outputs/static/js/components/plugin-memswap.vue
index 9785072e..2194b8d0 100644
--- a/glances/outputs/static/js/components/plugin-memswap.vue
+++ b/glances/outputs/static/js/components/plugin-memswap.vue
@@ -31,38 +31,38 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-network.vue b/glances/outputs/static/js/components/plugin-network.vue
index 1598b0c3..05808732 100644
--- a/glances/outputs/static/js/components/plugin-network.vue
+++ b/glances/outputs/static/js/components/plugin-network.vue
@@ -53,65 +53,73 @@ v-show="!args.network_cumul && !args.network_sum" class="text-end"
diff --git a/glances/outputs/static/js/components/plugin-now.vue b/glances/outputs/static/js/components/plugin-now.vue
index 2f862456..d9e657da 100644
--- a/glances/outputs/static/js/components/plugin-now.vue
+++ b/glances/outputs/static/js/components/plugin-now.vue
@@ -6,15 +6,15 @@
diff --git a/glances/outputs/static/js/components/plugin-percpu.vue b/glances/outputs/static/js/components/plugin-percpu.vue
index 05e3fad3..ff1aaf0b 100644
--- a/glances/outputs/static/js/components/plugin-percpu.vue
+++ b/glances/outputs/static/js/components/plugin-percpu.vue
@@ -32,42 +32,42 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-ports.vue b/glances/outputs/static/js/components/plugin-ports.vue
index bea616a7..2f51ca8d 100644
--- a/glances/outputs/static/js/components/plugin-ports.vue
+++ b/glances/outputs/static/js/components/plugin-ports.vue
@@ -30,46 +30,46 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-process.vue b/glances/outputs/static/js/components/plugin-process.vue
index 57396753..13e393b5 100644
--- a/glances/outputs/static/js/components/plugin-process.vue
+++ b/glances/outputs/static/js/components/plugin-process.vue
@@ -16,75 +16,75 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-processcount.vue b/glances/outputs/static/js/components/plugin-processcount.vue
index aaa86b0e..12ae42e5 100644
--- a/glances/outputs/static/js/components/plugin-processcount.vue
+++ b/glances/outputs/static/js/components/plugin-processcount.vue
@@ -12,44 +12,44 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-processlist.vue b/glances/outputs/static/js/components/plugin-processlist.vue
index 20f0ab32..90d4912c 100644
--- a/glances/outputs/static/js/components/plugin-processlist.vue
+++ b/glances/outputs/static/js/components/plugin-processlist.vue
@@ -380,246 +380,304 @@
diff --git a/glances/outputs/static/js/components/plugin-quicklook.vue b/glances/outputs/static/js/components/plugin-quicklook.vue
index e847eeb8..805b747b 100644
--- a/glances/outputs/static/js/components/plugin-quicklook.vue
+++ b/glances/outputs/static/js/components/plugin-quicklook.vue
@@ -51,73 +51,82 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-raid.vue b/glances/outputs/static/js/components/plugin-raid.vue
index cc3a73e3..d0a26cfd 100644
--- a/glances/outputs/static/js/components/plugin-raid.vue
+++ b/glances/outputs/static/js/components/plugin-raid.vue
@@ -37,54 +37,57 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-sensors.vue b/glances/outputs/static/js/components/plugin-sensors.vue
index 8af585f3..ccf7f946 100644
--- a/glances/outputs/static/js/components/plugin-sensors.vue
+++ b/glances/outputs/static/js/components/plugin-sensors.vue
@@ -22,61 +22,63 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-smart.vue b/glances/outputs/static/js/components/plugin-smart.vue
index 9eff1d1c..ebfc4189 100644
--- a/glances/outputs/static/js/components/plugin-smart.vue
+++ b/glances/outputs/static/js/components/plugin-smart.vue
@@ -25,28 +25,30 @@
diff --git a/glances/outputs/static/js/components/plugin-system.vue b/glances/outputs/static/js/components/plugin-system.vue
index d03e8650..27de0a85 100644
--- a/glances/outputs/static/js/components/plugin-system.vue
+++ b/glances/outputs/static/js/components/plugin-system.vue
@@ -7,32 +7,32 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-uptime.vue b/glances/outputs/static/js/components/plugin-uptime.vue
index 0c99eb4b..3791cbf9 100644
--- a/glances/outputs/static/js/components/plugin-uptime.vue
+++ b/glances/outputs/static/js/components/plugin-uptime.vue
@@ -6,15 +6,15 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/components/plugin-vms.vue b/glances/outputs/static/js/components/plugin-vms.vue
index c3a0ebfc..0138ec09 100644
--- a/glances/outputs/static/js/components/plugin-vms.vue
+++ b/glances/outputs/static/js/components/plugin-vms.vue
@@ -61,100 +61,103 @@
diff --git a/glances/outputs/static/js/components/plugin-wifi.vue b/glances/outputs/static/js/components/plugin-wifi.vue
index cd0559d9..02e657a2 100644
--- a/glances/outputs/static/js/components/plugin-wifi.vue
+++ b/glances/outputs/static/js/components/plugin-wifi.vue
@@ -20,46 +20,46 @@
\ No newline at end of file
diff --git a/glances/outputs/static/js/filters.js b/glances/outputs/static/js/filters.js
index 81a99da3..ca3209be 100644
--- a/glances/outputs/static/js/filters.js
+++ b/glances/outputs/static/js/filters.js
@@ -1,141 +1,144 @@
-import { min } from 'lodash';
-import sanitizeHtml from 'sanitize-html';
+import { min } from "lodash";
+import sanitizeHtml from "sanitize-html";
export function bits(bits, low_precision) {
- bits = Math.round(bits) * 8;
- return bytes(bits, low_precision) + 'b';
+ bits = Math.round(bits) * 8;
+ return bytes(bits, low_precision) + "b";
}
export function bytes(bytes, low_precision) {
- low_precision = low_precision || false;
- if (isNaN(parseFloat(bytes)) || !isFinite(bytes) || bytes == 0) {
- return bytes;
- }
+ low_precision = low_precision || false;
+ if (isNaN(parseFloat(bytes)) || !isFinite(bytes) || bytes == 0) {
+ return bytes;
+ }
- const symbols = ['Y', 'Z', 'E', 'P', 'T', 'G', 'M', 'K'];
- const prefix = {
- Y: 1208925819614629174706176,
- Z: 1180591620717411303424,
- E: 1152921504606846976,
- P: 1125899906842624,
- T: 1099511627776,
- G: 1073741824,
- M: 1048576,
- K: 1024
- };
+ const symbols = ["Y", "Z", "E", "P", "T", "G", "M", "K"];
+ const prefix = {
+ Y: 1208925819614629174706176,
+ Z: 1180591620717411303424,
+ E: 1152921504606846976,
+ P: 1125899906842624,
+ T: 1099511627776,
+ G: 1073741824,
+ M: 1048576,
+ K: 1024,
+ };
- for (var i = 0; i < symbols.length; i++) {
- var symbol = symbols[i];
- var value = bytes / prefix[symbol];
+ for (var i = 0; i < symbols.length; i++) {
+ var symbol = symbols[i];
+ var value = bytes / prefix[symbol];
- if (value > 1) {
- var decimal_precision = 0;
+ if (value > 1) {
+ var decimal_precision = 0;
- if (value < 10) {
- decimal_precision = 2;
- } else if (value < 100) {
- decimal_precision = 1;
- }
+ if (value < 10) {
+ decimal_precision = 2;
+ } else if (value < 100) {
+ decimal_precision = 1;
+ }
- if (low_precision) {
- if (symbol == 'MK') {
- decimal_precision = 0;
- } else {
- decimal_precision = min([1, decimal_precision]);
- }
- } else if (symbol == 'K') {
- decimal_precision = 0;
- }
+ if (low_precision) {
+ if (symbol == "MK") {
+ decimal_precision = 0;
+ } else {
+ decimal_precision = min([1, decimal_precision]);
+ }
+ } else if (symbol == "K") {
+ decimal_precision = 0;
+ }
- return parseFloat(value).toFixed(decimal_precision) + symbol;
- }
- }
+ return parseFloat(value).toFixed(decimal_precision) + symbol;
+ }
+ }
- return bytes.toFixed(0);
+ return bytes.toFixed(0);
}
export function exclamation(input) {
- if (input === undefined || input === '') {
- return '?';
- }
- return input;
+ if (input === undefined || input === "") {
+ return "?";
+ }
+ return input;
}
export function leftPad(value, length, chars) {
- length = length || 0;
- chars = chars || ' ';
- return String(value).padStart(length, chars);
+ length = length || 0;
+ chars = chars || " ";
+ return String(value).padStart(length, chars);
}
export function limitTo(value, limit) {
- if (typeof value.slice !== 'function') {
- value = String(value);
- }
- return value.slice(0, limit);
+ if (typeof value.slice !== "function") {
+ value = String(value);
+ }
+ return value.slice(0, limit);
}
export function minSize(input, max, begin = true) {
- max = max || 8;
- if (input.length > max) {
- if (begin) {
- return input.substring(0, max - 1) + '_';
- } else {
- return '_' + input.substring(input.length - max + 1);
- }
- }
- return input;
+ max = max || 8;
+ if (input.length > max) {
+ if (begin) {
+ return input.substring(0, max - 1) + "_";
+ } else {
+ return "_" + input.substring(input.length - max + 1);
+ }
+ }
+ return input;
}
export function nl2br(input) {
- function escapeHTML(html) {
- var div = document.createElement('div');
- div.innerText = html;
- return div.innerHTML;
- }
+ function escapeHTML(html) {
+ var div = document.createElement("div");
+ div.innerText = html;
+ return div.innerHTML;
+ }
- if (typeof input === 'undefined') {
- return input;
- }
+ if (typeof input === "undefined") {
+ return input;
+ }
- var sanitizedInput = escapeHTML(input);
- var html = sanitizedInput.replace(/\n/g, '
');
+ var sanitizedInput = escapeHTML(input);
+ var html = sanitizedInput.replace(/\n/g, "
");
- return sanitizeHtml(html);
+ return sanitizeHtml(html);
}
export function number(value, options) {
- // If value is undefined or not a number then return '-'
- if ((typeof value === 'undefined') || isNaN(value)) {
- return '-';
- }
- // Else
- return new Intl.NumberFormat(
- "en-US",
- typeof options === 'number' ? { maximumFractionDigits: options } : options
- ).format(value);
+ // If value is undefined or not a number then return '-'
+ if (typeof value === "undefined" || isNaN(value)) {
+ return "-";
+ }
+ // Else
+ return new Intl.NumberFormat(
+ "en-US",
+ typeof options === "number" ? { maximumFractionDigits: options } : options,
+ ).format(value);
}
export function timemillis(array) {
- var sum = 0.0;
- for (var i = 0; i < array.length; i++) {
- sum += array[i] * 1000.0;
- }
- return sum;
+ var sum = 0.0;
+ for (var i = 0; i < array.length; i++) {
+ sum += array[i] * 1000.0;
+ }
+ return sum;
}
export function timedelta(value) {
- var sum = timemillis(value);
- var d = new Date(sum);
- var doy = Math.floor((d - new Date(d.getFullYear(), 0, 0)) / 1000 / 60 / 60 / 24);
- return {
- hours: d.getUTCHours() + (doy - 1) * 24,
- minutes: d.getUTCMinutes(),
- seconds: d.getUTCSeconds(),
- milliseconds: parseInt('' + d.getUTCMilliseconds() / 10)
- };
+ var sum = timemillis(value);
+ var d = new Date(sum);
+ var doy = Math.floor(
+ (d - new Date(d.getFullYear(), 0, 0)) / 1000 / 60 / 60 / 24,
+ );
+ return {
+ hours: d.getUTCHours() + (doy - 1) * 24,
+ minutes: d.getUTCMinutes(),
+ seconds: d.getUTCSeconds(),
+ milliseconds: parseInt("" + d.getUTCMilliseconds() / 10),
+ };
}
export function dictToString(dict) {
- return Object.entries(dict).map(([key, value]) => `${key}: ${value}`).join(' / ');
+ return Object.entries(dict)
+ .map(([key, value]) => `${key}: ${value}`)
+ .join(" / ");
}
-
diff --git a/glances/outputs/static/js/services.js b/glances/outputs/static/js/services.js
index 0b422e9d..9e7b7d4c 100644
--- a/glances/outputs/static/js/services.js
+++ b/glances/outputs/static/js/services.js
@@ -1,132 +1,140 @@
-import { store } from './store.js';
-import Favico from 'favico.js';
+import Favico from "favico.js";
+import { store } from "./store.js";
// prettier-ignore
-const fetchAll = () => fetch('api/4/all', { method: 'GET' }).then((response) => response.json());
+const fetchAll = () =>
+ fetch("api/4/all", { method: "GET" }).then((response) => response.json());
// prettier-ignore
-const fetchAllViews = () => fetch('api/4/all/views', { method: 'GET' }).then((response) => response.json());
+const fetchAllViews = () =>
+ fetch("api/4/all/views", { method: "GET" }).then((response) =>
+ response.json(),
+ );
// prettier-ignore
-const fetchAllLimits = () => fetch('api/4/all/limits', { method: 'GET' }).then((response) => response.json());
+const fetchAllLimits = () =>
+ fetch("api/4/all/limits", { method: "GET" }).then((response) =>
+ response.json(),
+ );
// prettier-ignore
-const fetchArgs = () => fetch('api/4/args', { method: 'GET' }).then((response) => response.json());
+const fetchArgs = () =>
+ fetch("api/4/args", { method: "GET" }).then((response) => response.json());
// prettier-ignore
-const fetchConfig = () => fetch('api/4/config', { method: 'GET' }).then((response) => response.json());
-
+const fetchConfig = () =>
+ fetch("api/4/config", { method: "GET" }).then((response) => response.json());
class GlancesHelperService {
- limits = {};
- limitSuffix = ['critical', 'careful', 'warning'];
+ limits = {};
+ limitSuffix = ["critical", "careful", "warning"];
- setLimits(limits) {
- this.limits = limits;
- }
+ setLimits(limits) {
+ this.limits = limits;
+ }
- getLimit(pluginName, limitName) {
- if (this.limits[pluginName] != undefined) {
- if (this.limits[pluginName][limitName] != undefined) {
- return this.limits[pluginName][limitName]
- }
- }
- return null
- }
+ getLimit(pluginName, limitName) {
+ if (this.limits[pluginName] != undefined) {
+ if (this.limits[pluginName][limitName] != undefined) {
+ return this.limits[pluginName][limitName];
+ }
+ }
+ return null;
+ }
- getAlert(pluginName, limitNamePrefix, current, maximum, log) {
- current = current || 0;
- maximum = maximum || 100;
- log = log || false;
+ getAlert(pluginName, limitNamePrefix, current, maximum, log) {
+ current = current || 0;
+ maximum = maximum || 100;
+ log = log || false;
- var log_str = log ? '_log' : '';
- var value = (current * 100) / maximum;
+ var log_str = log ? "_log" : "";
+ var value = (current * 100) / maximum;
- if (this.limits[pluginName] != undefined) {
- for (var i = 0; i < this.limitSuffix.length; i++) {
- var limitName = limitNamePrefix + this.limitSuffix[i];
- var limit = this.limits[pluginName][limitName];
- if (value >= limit) {
- var pos = limitName.lastIndexOf('_');
- var className = limitName.substring(pos + 1);
- return className + log_str;
- }
- }
- }
+ if (this.limits[pluginName] != undefined) {
+ for (var i = 0; i < this.limitSuffix.length; i++) {
+ var limitName = limitNamePrefix + this.limitSuffix[i];
+ var limit = this.limits[pluginName][limitName];
+ if (value >= limit) {
+ var pos = limitName.lastIndexOf("_");
+ var className = limitName.substring(pos + 1);
+ return className + log_str;
+ }
+ }
+ }
- return 'ok' + log_str;
- }
+ return "ok" + log_str;
+ }
- getAlertLog(pluginName, limitNamePrefix, current, maximum) {
- return this.getAlert(pluginName, limitNamePrefix, current, maximum, true);
- }
+ getAlertLog(pluginName, limitNamePrefix, current, maximum) {
+ return this.getAlert(pluginName, limitNamePrefix, current, maximum, true);
+ }
}
export const GlancesHelper = new GlancesHelperService();
class GlancesStatsService {
- data = undefined;
+ data = undefined;
- init(REFRESH_TIME = 60) {
- let timeout = undefined;
- const fetchData = () => {
- store.status = 'PENDING';
- return Promise.all([fetchAll(), fetchAllViews()])
- .then((response) => {
- const data = {
- stats: response[0],
- views: response[1],
- isBsd: response[0].system?.os_name === 'FreeBSD',
- isLinux: response[0].system?.os_name === 'Linux',
- isSunOS: response[0].system?.os_name === 'SunOS',
- isMac: response[0].system?.os_name === 'Darwin',
- isWindows: response[0].system?.os_name === 'Windows'
- };
- this.data = data;
- store.data = data;
- store.status = 'SUCCESS';
- })
- .catch((error) => {
- console.log(error);
- store.status = 'FAILURE';
- })
- .then(() => {
- if (timeout) {
- clearTimeout(timeout);
- }
- timeout = setTimeout(fetchData, REFRESH_TIME * 1000); // in milliseconds
- });
- };
- fetchData();
+ init(REFRESH_TIME = 60) {
+ let timeout;
+ const fetchData = () => {
+ store.status = "PENDING";
+ return Promise.all([fetchAll(), fetchAllViews()])
+ .then((response) => {
+ const data = {
+ stats: response[0],
+ views: response[1],
+ isBsd: response[0].system?.os_name === "FreeBSD",
+ isLinux: response[0].system?.os_name === "Linux",
+ isSunOS: response[0].system?.os_name === "SunOS",
+ isMac: response[0].system?.os_name === "Darwin",
+ isWindows: response[0].system?.os_name === "Windows",
+ };
+ this.data = data;
+ store.data = data;
+ store.status = "SUCCESS";
+ })
+ .catch((error) => {
+ console.log(error);
+ store.status = "FAILURE";
+ })
+ .then(() => {
+ if (timeout) {
+ clearTimeout(timeout);
+ }
+ timeout = setTimeout(fetchData, REFRESH_TIME * 1000); // in milliseconds
+ });
+ };
+ fetchData();
- fetchAllLimits().then((response) => {
- GlancesHelper.setLimits(response);
- });
+ fetchAllLimits().then((response) => {
+ GlancesHelper.setLimits(response);
+ });
- fetchArgs().then((response = {}) => {
- store.args = { ...store.args, ...response };
- });
+ fetchArgs().then((response = {}) => {
+ store.args = { ...store.args, ...response };
+ });
- fetchConfig().then((response = {}) => {
- store.config = { ...store.config, ...response };
- });
- }
+ fetchConfig().then((response = {}) => {
+ store.config = { ...store.config, ...response };
+ });
+ }
- getData() {
- return this.data;
- }
+ getData() {
+ return this.data;
+ }
}
export const GlancesStats = new GlancesStatsService();
class GlancesFavicoService {
- constructor() {
- this.favico = new Favico({
- animation: 'none'
- });
- }
- badge(nb) {
- this.favico.badge(nb);
- }
- reset() {
- this.favico.reset();
- }
+ constructor() {
+ this.favico = new Favico({
+ animation: "none",
+ });
+ }
+ badge(nb) {
+ this.favico.badge(nb);
+ }
+ reset() {
+ this.favico.reset();
+ }
}
export const GlancesFavico = new GlancesFavicoService();
diff --git a/glances/outputs/static/js/store.js b/glances/outputs/static/js/store.js
index e5b5da80..c0f74714 100644
--- a/glances/outputs/static/js/store.js
+++ b/glances/outputs/static/js/store.js
@@ -1,8 +1,8 @@
-import { reactive } from 'vue';
+import { reactive } from "vue";
export const store = reactive({
- args: undefined,
- config: undefined,
- data: undefined,
- status: 'IDLE'
+ args: undefined,
+ config: undefined,
+ data: undefined,
+ status: "IDLE",
});
diff --git a/glances/outputs/static/js/uiconfig.json b/glances/outputs/static/js/uiconfig.json
index 1f574dde..f5bccfe1 100644
--- a/glances/outputs/static/js/uiconfig.json
+++ b/glances/outputs/static/js/uiconfig.json
@@ -1,24 +1,16 @@
{
- "topMenu": [
- "quicklook",
- "cpu",
- "percpu",
- "gpu",
- "mem",
- "memswap",
- "load"
- ],
- "leftMenu": [
- "network",
- "ports",
- "wifi",
- "connections",
- "diskio",
- "fs",
- "irq",
- "folders",
- "raid",
- "smart",
- "sensors"
- ]
+ "topMenu": ["quicklook", "cpu", "percpu", "gpu", "mem", "memswap", "load"],
+ "leftMenu": [
+ "network",
+ "ports",
+ "wifi",
+ "connections",
+ "diskio",
+ "fs",
+ "irq",
+ "folders",
+ "raid",
+ "smart",
+ "sensors"
+ ]
}
diff --git a/glances/outputs/static/package.json b/glances/outputs/static/package.json
index 355ef51b..cd47310b 100644
--- a/glances/outputs/static/package.json
+++ b/glances/outputs/static/package.json
@@ -1,41 +1,41 @@
{
- "private": true,
- "dependencies": {
- "bootstrap": "^5.3.5",
- "favico.js": "^0.3.10",
- "hotkeys-js": "^3.13.9",
- "lodash": "^4.17.21",
- "sanitize-html": "^2.16.0",
- "vue": "^3.5.13"
- },
- "devDependencies": {
- "@vue/compiler-sfc": "^3.5.13",
- "copy-webpack-plugin": "^13.0.0",
- "css-loader": "^7.1.2",
- "del": "^8.0.0",
- "eslint": "^9.25.0",
- "eslint-config-prettier": "^10.1.2",
- "eslint-plugin-vue": "^10.0.0",
- "globals": "^16.0.0",
- "html-webpack-plugin": "^5.6.3",
- "less": "^4.3.0",
- "less-loader": "^12.2.0",
- "sass": "^1.86.3",
- "sass-loader": "^16.0.5",
- "style-loader": "^4.0.0",
- "typescript-eslint": "^8.30.1",
- "url-loader": "^4.1.1",
- "vue-loader": "^17.4.2",
- "webpack": "^5.99.6",
- "webpack-cli": "^6.0.1",
- "webpack-dev-server": "^5.2.1"
- },
- "scripts": {
- "build": "webpack --progress --mode=production",
- "start": "webpack serve --mode=development",
- "watch": "webpack --progress --watch",
- "lint": "eslint ./ --ext .js,.vue",
- "lint-fix": "eslint ./ --ext .js,.vue --fix",
- "clean": "rm -rf node_modules"
- }
+ "private": true,
+ "dependencies": {
+ "bootstrap": "^5.3.5",
+ "favico.js": "^0.3.10",
+ "hotkeys-js": "^3.13.9",
+ "lodash": "^4.17.21",
+ "sanitize-html": "^2.16.0",
+ "vue": "^3.5.13"
+ },
+ "devDependencies": {
+ "@vue/compiler-sfc": "^3.5.13",
+ "copy-webpack-plugin": "^13.0.0",
+ "css-loader": "^7.1.2",
+ "del": "^8.0.0",
+ "eslint": "^9.25.0",
+ "eslint-config-prettier": "^10.1.2",
+ "eslint-plugin-vue": "^10.0.0",
+ "globals": "^16.0.0",
+ "html-webpack-plugin": "^5.6.3",
+ "less": "^4.3.0",
+ "less-loader": "^12.2.0",
+ "sass": "^1.86.3",
+ "sass-loader": "^16.0.5",
+ "style-loader": "^4.0.0",
+ "typescript-eslint": "^8.30.1",
+ "url-loader": "^4.1.1",
+ "vue-loader": "^17.4.2",
+ "webpack": "^5.99.6",
+ "webpack-cli": "^6.0.1",
+ "webpack-dev-server": "^5.2.1"
+ },
+ "scripts": {
+ "build": "webpack --progress --mode=production",
+ "start": "webpack serve --mode=development",
+ "watch": "webpack --progress --watch",
+ "lint": "eslint ./ --ext .js,.vue",
+ "lint-fix": "eslint ./ --ext .js,.vue --fix",
+ "clean": "rm -rf node_modules"
+ }
}
diff --git a/glances/outputs/static/webpack.config.js b/glances/outputs/static/webpack.config.js
index 8db5ea7f..7eaac45e 100644
--- a/glances/outputs/static/webpack.config.js
+++ b/glances/outputs/static/webpack.config.js
@@ -1,86 +1,90 @@
-
-const webpack = require('webpack');
+const webpack = require("webpack");
const path = require("path");
const CopyWebpackPlugin = require("copy-webpack-plugin");
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const TerserWebpackPlugin = require('terser-webpack-plugin');
-const { VueLoaderPlugin } = require('vue-loader');
+const HtmlWebpackPlugin = require("html-webpack-plugin");
+const TerserWebpackPlugin = require("terser-webpack-plugin");
+const { VueLoaderPlugin } = require("vue-loader");
const PORT = process.env.PORT || 61209;
module.exports = (_, env) => {
- const isProd = env.mode === 'production';
+ const isProd = env.mode === "production";
- return {
- mode: isProd ? 'production' : 'development',
- entry: {
- glances: "./js/app.js",
- browser: "./js/browser.js"
- },
- output: {
- path: path.join(__dirname, "public"),
- filename: "[name].js",
- publicPath: '/',
- clean: true
- },
- devtool: isProd ? false : 'eval-source-map',
- module: {
- rules: [
- {
- test: /\.vue$/i,
- loader: 'vue-loader'
- },
- {
- test: /\.scss$/i,
- use: [{
- loader: "style-loader",
- }, {
- loader: "css-loader",
- }, {
- loader: "sass-loader",
- }]
- },
- {
- test: /\.css$/i,
- use: [{
- loader: "style-loader",
- }, {
- loader: "css-loader",
- }]
- }
- ],
- },
- plugins: [
- new webpack.DefinePlugin({
- __VUE_OPTIONS_API__: true,
- __VUE_PROD_DEVTOOLS__: false,
- __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
- }),
- new CopyWebpackPlugin({
- patterns: [
- { from: "./images/favicon.ico" }
- ]
- }),
- !isProd && new HtmlWebpackPlugin({
- template: './templates/index.html',
- inject: false
- }),
- isProd && new TerserWebpackPlugin({ extractComments: false }),
- new VueLoaderPlugin()
- ].filter(Boolean),
- devServer: {
- client: {
- overlay: false
- },
- host: '0.0.0.0',
- port: PORT,
- hot: true,
- proxy: [
- {
- context: ['/api'],
- target: 'http://0.0.0.0:61208'
- }
- ]
- }
-
- };
+ return {
+ mode: isProd ? "production" : "development",
+ entry: {
+ glances: "./js/app.js",
+ browser: "./js/browser.js",
+ },
+ output: {
+ path: path.join(__dirname, "public"),
+ filename: "[name].js",
+ publicPath: "/",
+ clean: true,
+ },
+ devtool: isProd ? false : "eval-source-map",
+ module: {
+ rules: [
+ {
+ test: /\.vue$/i,
+ loader: "vue-loader",
+ },
+ {
+ test: /\.scss$/i,
+ use: [
+ {
+ loader: "style-loader",
+ },
+ {
+ loader: "css-loader",
+ },
+ {
+ loader: "sass-loader",
+ },
+ ],
+ },
+ {
+ test: /\.css$/i,
+ use: [
+ {
+ loader: "style-loader",
+ },
+ {
+ loader: "css-loader",
+ },
+ ],
+ },
+ ],
+ },
+ plugins: [
+ new webpack.DefinePlugin({
+ __VUE_OPTIONS_API__: true,
+ __VUE_PROD_DEVTOOLS__: false,
+ __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false,
+ }),
+ new CopyWebpackPlugin({
+ patterns: [{ from: "./images/favicon.ico" }],
+ }),
+ !isProd &&
+ new HtmlWebpackPlugin({
+ template: "./templates/index.html",
+ inject: false,
+ }),
+ isProd && new TerserWebpackPlugin({ extractComments: false }),
+ new VueLoaderPlugin(),
+ ].filter(Boolean),
+ devServer: {
+ client: {
+ overlay: false,
+ },
+ host: "0.0.0.0",
+ port: PORT,
+ hot: true,
+ proxy: [
+ {
+ context: ["/api"],
+ target: "http://0.0.0.0:61208",
+ },
+ ],
+ },
+ };
};
diff --git a/renovate.json b/renovate.json
index 2e74c27b..1a0dbc5a 100644
--- a/renovate.json
+++ b/renovate.json
@@ -1,8 +1,6 @@
{
- "$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "extends": [
- "config:recommended"
- ],
- "prHourlyLimit": 3,
- "updateLockFiles": false
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
+ "extends": ["config:recommended"],
+ "prHourlyLimit": 3,
+ "updateLockFiles": false
}
diff --git a/tests-data/issues/issue3322-homepage/run-homepage.sh b/tests-data/issues/issue3322-homepage/run-homepage.sh
old mode 100644
new mode 100755
index 26b18ef1..75286768
--- a/tests-data/issues/issue3322-homepage/run-homepage.sh
+++ b/tests-data/issues/issue3322-homepage/run-homepage.sh
@@ -1,7 +1,9 @@
+#!/bin/sh
+
docker run --rm \
- --name homepage \
- -p 3000:3000 \
- -e HOMEPAGE_ALLOWED_HOSTS=localhost:3000,0.0.0.0:3000 \
- -v ./config:/app/config \
- -v /var/run/docker.sock:/var/run/docker.sock \
- ghcr.io/gethomepage/homepage:latest
+ --name homepage \
+ -p 3000:3000 \
+ -e HOMEPAGE_ALLOWED_HOSTS=localhost:3000,0.0.0.0:3000 \
+ -v ./config:/app/config \
+ -v /var/run/docker.sock:/var/run/docker.sock \
+ ghcr.io/gethomepage/homepage:latest
diff --git a/tests-data/issues/issue3333-homeassistant/run-homeassistant.sh b/tests-data/issues/issue3333-homeassistant/run-homeassistant.sh
old mode 100644
new mode 100755
index 8874c411..765f2e16
--- a/tests-data/issues/issue3333-homeassistant/run-homeassistant.sh
+++ b/tests-data/issues/issue3333-homeassistant/run-homeassistant.sh
@@ -1,9 +1,11 @@
+#!/bin/sh
+
docker run -d \
- --name homeassistant \
- --privileged \
- --restart=unless-stopped \
- -e TZ=Europe/Paris \
- -v ./config:/config \
- -v /run/dbus:/run/dbus:ro \
- --network=host \
- ghcr.io/home-assistant/home-assistant:stable
+ --name homeassistant \
+ --privileged \
+ --restart=unless-stopped \
+ -e TZ=Europe/Paris \
+ -v ./config:/config \
+ -v /run/dbus:/run/dbus:ro \
+ --network=host \
+ ghcr.io/home-assistant/home-assistant:stable
diff --git a/tests-data/tools/find-duplicate-lines.sh b/tests-data/tools/find-duplicate-lines.sh
old mode 100644
new mode 100755
index b52c2f2b..6171f620
--- a/tests-data/tools/find-duplicate-lines.sh
+++ b/tests-data/tools/find-duplicate-lines.sh
@@ -1,3 +1,5 @@
+#!/bin/sh
+
find ./glances/ -type f -name "*.py" -exec sh -c '
duplicate_found=0
for file; do
diff --git a/tests/test_export_influxdb_v1.sh b/tests/test_export_influxdb_v1.sh
index 58494a73..f7940c4b 100755
--- a/tests/test_export_influxdb_v1.sh
+++ b/tests/test_export_influxdb_v1.sh
@@ -19,7 +19,7 @@ for i in {1..30}; do
break
fi
- if [ $i -eq 30 ]; then
+ if [ "$i" -eq 30 ]; then
echo "Error: Timed out waiting for InfluxDB to start"
docker stop influxdb-v1-for-glances
docker rm influxdb-v1-for-glances
@@ -68,4 +68,4 @@ echo "Stopping and removing InfluxDB container..."
docker stop influxdb-v1-for-glances
docker rm influxdb-v1-for-glances
-echo "Script completed successfully!"
\ No newline at end of file
+echo "Script completed successfully!"
diff --git a/tests/test_export_influxdb_v3.sh b/tests/test_export_influxdb_v3.sh
index 35f6016c..0a104a2e 100755
--- a/tests/test_export_influxdb_v3.sh
+++ b/tests/test_export_influxdb_v3.sh
@@ -18,7 +18,7 @@ sleep 5
# Create the token
echo "Creating InfluxDB token..."
TOKEN_RETURN=$(docker exec influxdb-v3-for-glances influxdb3 create token --admin)
-TOKEN=$(echo -n $TOKEN_RETURN | awk '{ print $6 }')
+TOKEN=$(echo -n "$TOKEN_RETURN" | awk '{ print $6 }')
echo "Token: $TOKEN"
# Create a new configuration for the test
diff --git a/uninstall.sh b/uninstall.sh
index 5597ec1d..1433cec8 100755
--- a/uninstall.sh
+++ b/uninstall.sh
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
-if [ $(id -u) -ne 0 ]; then
- echo -e "* ERROR: User $(whoami) is not root, and does not have sudo privileges"
+if [ "$(id -u)" != "0" ]; then
+ echo "* ERROR: User $(whoami) is not root, and does not have sudo privileges"
exit 1
fi
@@ -14,9 +14,9 @@ fi
python setup.py install --record install.record
-for i in $(cat install.record); do
- rm $i
-done
+while IFS= read -r i; do
+ rm "$i"
+done < install.record
echo -e "\n\n* SUCCESS: Uninstall complete."
rm install.record