From 9d6b6777bfeed24e96d4a5168b7246d10ce70804 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Wed, 27 Oct 2021 23:30:17 +0200 Subject: [PATCH] graphs --- bundles/grafana/items.py | 3 +++ data/grafana/rows/zfs_arc.py | 45 +++++++++++++++++------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/bundles/grafana/items.py b/bundles/grafana/items.py index e336093..c4e765a 100644 --- a/bundles/grafana/items.py +++ b/bundles/grafana/items.py @@ -125,6 +125,9 @@ for dashboard_id, monitored_node in enumerate(monitored_nodes, start=1): if 'legend' in panel_config: panel['options']['legend'].update(panel_config['legend']) + + if 'tooltip' in panel_config: + panel['options']['tooltip']['mode'] = panel_config['tooltip'] for query_name, query_config in panel_config['queries'].items(): panel['targets'].append({ diff --git a/data/grafana/rows/zfs_arc.py b/data/grafana/rows/zfs_arc.py index bd9a12c..2f598e6 100644 --- a/data/grafana/rows/zfs_arc.py +++ b/data/grafana/rows/zfs_arc.py @@ -13,55 +13,52 @@ 'function': 'mean', }, }, + 'min': 0, 'unit': 'bytes', }, 'hits': { + 'stacked': True, 'queries': { 'hits': { 'filters': { '_measurement': 'zfs', '_field': [ - 'arcstats_hits', + 'arcstats_demand_data_hits', + 'arcstats_demand_metadata_hits', + 'arcstats_prefetch_data_hits', + 'arcstats_prefetch_metadata_hits', ], }, 'function': 'derivative', }, - 'misses': { - 'filters': { - '_measurement': 'zfs', - '_field': [ - 'arcstats_misses', - ], - }, - 'function': 'derivative', - 'negative': True, - }, }, + 'legend': { + 'displayMode': 'hidden', + }, + 'tooltip': 'multi', }, - 'l2_hits': { + 'misses': { + 'stacked': True, 'queries': { - 'hits': { - 'filters': { - '_measurement': 'zfs', - '_field': [ - 'arcstats_l2_hits', - ], - }, - 'function': 'derivative', - }, 'misses': { 'filters': { '_measurement': 'zfs', '_field': [ - 'arcstats_l2_misses', + 'arcstats_demand_data_misses', + 'arcstats_demand_metadata_misses', + 'arcstats_prefetch_data_misses', + 'arcstats_prefetch_metadata_misses', ], }, 'function': 'derivative', - 'negative': True, }, }, + 'legend': { + 'displayMode': 'hidden', + }, + 'tooltip': 'multi', }, - 'l2_io': { + 'l2': { 'queries': { 'read': { 'filters': {