disk_io only partitions

This commit is contained in:
mwiegand 2022-08-12 18:19:19 +02:00
parent 3b257aadab
commit 63b68b8d3e
4 changed files with 13 additions and 1 deletions
bundles
grafana
telegraf
data/grafana

View file

@ -151,6 +151,7 @@ for dashboard_id, monitored_node in enumerate(monitored_nodes, start=1):
'host': monitored_node.name,
**query_config['filters'],
},
exists=query_config.get('exists', []),
function=query_config.get('function', None),
).strip()
})

View file

@ -45,7 +45,9 @@ defaults = {
'memory_rss',
],
})},
'diskio': {h({})},
'diskio': {h({
'device_tags': ["ID_PART_ENTRY_NUMBER"],
})},
'kernel': {h({})},
'mem': {h({})},
'processes': {h({})},

View file

@ -3,6 +3,9 @@ from(bucket: "${bucket}")
% for key, values in filters.items():
<% values = values if isinstance(values, list) else [values] %>\
|> filter(fn: (r) => ${' or '.join(f'r["{key}"] == "{value}"' for value in values)})
% endfor
% for exist in exists:
|> filter(fn: (r) => exists r["${exist}"]) // WTF
% endfor
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false) // aggregate early for best performance
% if minimum:

View file

@ -9,6 +9,9 @@
'read_bytes',
],
},
'exists': [
'ID_PART_ENTRY_NUMBER',
],
'function': 'derivative',
},
},
@ -26,6 +29,9 @@
'write_bytes',
],
},
'exists': [
'ID_PART_ENTRY_NUMBER',
],
'function': 'derivative',
},
},