flux min
This commit is contained in:
parent
a564d2ed31
commit
79820a0c10
5 changed files with 9 additions and 3 deletions
|
@ -138,6 +138,7 @@ for dashboard_id, monitored_node in enumerate(monitored_nodes, start=1):
|
||||||
negative=query_config.get('negative', False),
|
negative=query_config.get('negative', False),
|
||||||
boolean_to_int=query_config.get('boolean_to_int', False),
|
boolean_to_int=query_config.get('boolean_to_int', False),
|
||||||
resolution=query_config.get('resolution', 1) * 4,
|
resolution=query_config.get('resolution', 1) * 4,
|
||||||
|
minimum=query_config.get('minimum', None),
|
||||||
filters={
|
filters={
|
||||||
'host': monitored_node.name,
|
'host': monitored_node.name,
|
||||||
**query_config['filters'],
|
**query_config['filters'],
|
||||||
|
|
|
@ -4,6 +4,9 @@ from(bucket: "${bucket}")
|
||||||
<% values = values if isinstance(values, list) else [values] %>\
|
<% values = values if isinstance(values, list) else [values] %>\
|
||||||
|> filter(fn: (r) => ${' or '.join(f'r["{key}"] == "{value}"' for value in values)})
|
|> filter(fn: (r) => ${' or '.join(f'r["{key}"] == "{value}"' for value in values)})
|
||||||
% endfor
|
% endfor
|
||||||
|
% if minimum:
|
||||||
|
|> filter(fn: (r) => r._value > ${minimum})
|
||||||
|
% endif
|
||||||
% if function == 'derivative':
|
% if function == 'derivative':
|
||||||
|> derivative(nonNegative: true)
|
|> derivative(nonNegative: true)
|
||||||
% endif
|
% endif
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
'cpu_usage',
|
'cpu_usage',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'resolution': 6,
|
'minimum': 1,
|
||||||
|
'resolution': 2,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'unit': 'percent',
|
'unit': 'percent',
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
'memory_rss',
|
'memory_rss',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'resolution': 6,
|
'minimum': 10*(10**6),
|
||||||
|
'resolution': 2,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'unit': 'bytes',
|
'unit': 'bytes',
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
},
|
},
|
||||||
'smartctl': {
|
'smartctl': {
|
||||||
'/dev/disk/by-id/ata-TOSHIBA_MG06ACA10TE_61C0A1B1FKQE': {
|
'/dev/disk/by-id/ata-TOSHIBA_MG06ACA10TE_61C0A1B1FKQE': {
|
||||||
'apm': 32,
|
'apm': 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'zfs': {
|
'zfs': {
|
||||||
|
|
Loading…
Reference in a new issue