From ef461fec1cae3b2878d6be1080c10cba1443c304 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Wed, 27 Oct 2021 19:02:07 +0200 Subject: [PATCH] disk usage graphs --- bundles/telegraf/metadata.py | 8 ++++++- data/grafana/rows/disk_usage.py | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 data/grafana/rows/disk_usage.py diff --git a/bundles/telegraf/metadata.py b/bundles/telegraf/metadata.py index 126e870..195a8bc 100644 --- a/bundles/telegraf/metadata.py +++ b/bundles/telegraf/metadata.py @@ -46,7 +46,12 @@ defaults = { 'memory_rss', ], }], - 'diskio': [{}], + 'diskio': [{ + 'fieldpass': [ + 'read_bytes', + 'write_bytes', + ], + }], 'kernel': [{}], 'mem': [{}], 'processes': [{}], @@ -60,6 +65,7 @@ defaults = { 'cpu', 'mem', 'disk_io', + 'disk_usage', 'net_io', 'proc_cpu', 'proc_ram', diff --git a/data/grafana/rows/disk_usage.py b/data/grafana/rows/disk_usage.py new file mode 100644 index 0000000..adb7b64 --- /dev/null +++ b/data/grafana/rows/disk_usage.py @@ -0,0 +1,37 @@ +{ + 'root_usage': { + 'stacked': True, + 'queries': { + 'usage': { + 'filters': { + '_measurement': 'disk', + 'path': '/', + '_field': [ + 'used', + 'free', + ], + }, + 'function': 'mean', + }, + }, + 'min': 0, + 'unit': 'bytes', + }, + 'root_inodes': { + 'stacked': True, + 'queries': { + 'inodes': { + 'filters': { + '_measurement': 'disk', + 'path': '/', + '_field': [ + 'inodes_used', + 'inodes_free', + ], + }, + 'function': 'mean', + }, + }, + 'min': 0, + }, +}