From b8cbf4648aec1a17a4feaa7854997bb35214d445 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Thu, 7 Jul 2022 19:05:53 +0200 Subject: [PATCH] influx: remove now-obsolete resolution feature --- bundles/grafana/items.py | 1 - data/grafana/flux.mako | 2 +- data/grafana/rows/proc_cpu.py | 1 - data/grafana/rows/proc_ram.py | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/bundles/grafana/items.py b/bundles/grafana/items.py index 00474b0..b4a1b5e 100644 --- a/bundles/grafana/items.py +++ b/bundles/grafana/items.py @@ -142,7 +142,6 @@ for dashboard_id, monitored_node in enumerate(monitored_nodes, start=1): host=monitored_node.name, negative=query_config.get('negative', False), boolean_to_int=query_config.get('boolean_to_int', False), - resolution=query_config.get('resolution', 1), minimum=query_config.get('minimum', None), filters={ 'host': monitored_node.name, diff --git a/data/grafana/flux.mako b/data/grafana/flux.mako index c14f03f..0bf1c17 100644 --- a/data/grafana/flux.mako +++ b/data/grafana/flux.mako @@ -4,7 +4,7 @@ from(bucket: "${bucket}") <% values = values if isinstance(values, list) else [values] %>\ |> filter(fn: (r) => ${' or '.join(f'r["{key}"] == "{value}"' for value in values)}) % endfor - |> aggregateWindow(every: duration(v: int(v: v.windowPeriod)*${resolution}), fn: mean, createEmpty: false) // aggregate early for best performance + |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false) // aggregate early for best performance % if minimum: |> filter(fn: (r) => r._value > ${minimum}) % endif diff --git a/data/grafana/rows/proc_cpu.py b/data/grafana/rows/proc_cpu.py index ae334dd..fa19d88 100644 --- a/data/grafana/rows/proc_cpu.py +++ b/data/grafana/rows/proc_cpu.py @@ -10,7 +10,6 @@ ], }, 'minimum': 1, - 'resolution': 2, }, }, 'unit': 'percent', diff --git a/data/grafana/rows/proc_ram.py b/data/grafana/rows/proc_ram.py index 4a92af4..32d3ba3 100644 --- a/data/grafana/rows/proc_ram.py +++ b/data/grafana/rows/proc_ram.py @@ -10,7 +10,6 @@ ], }, 'minimum': 10*(10**6), - 'resolution': 2, }, }, 'unit': 'bytes',