remove levels from cum
This commit is contained in:
parent
226412a5d1
commit
71fb07c6e8
|
@ -115,11 +115,14 @@ def main():
|
||||||
|
|
||||||
perf_data[f'max_rate_in'] = {'value': int(check_result["rate_in"]), 'warn': warn_b_value, 'crit': crit_b_value, 'min': 0, 'unit': 'B'}
|
perf_data[f'max_rate_in'] = {'value': int(check_result["rate_in"]), 'warn': warn_b_value, 'crit': crit_b_value, 'min': 0, 'unit': 'B'}
|
||||||
perf_data[f'max_rate_out'] = {'value': int(check_result["rate_out"]), 'warn': warn_b_value, 'crit': crit_b_value, 'min': 0, 'unit': 'B'}
|
perf_data[f'max_rate_out'] = {'value': int(check_result["rate_out"]), 'warn': warn_b_value, 'crit': crit_b_value, 'min': 0, 'unit': 'B'}
|
||||||
perf_data[f'cumulative_in'] = {'value': int(check_result["cumulative_in"]), 'warn': warn_b_value, 'crit': crit_b_value, 'min': 0, 'unit': 'B'}
|
|
||||||
perf_data[f'cumulative_out'] = {'value': int(check_result["cumulative_out"]), 'warn': warn_b_value, 'crit': crit_b_value, 'min': 0, 'unit': 'B'}
|
# TODO: add warn/crit values for these metrics
|
||||||
|
perf_data[f'cumulative_in'] = {'value': int(check_result["cumulative_in"]), 'warn': None, 'crit': None, 'min': 0, 'unit': 'B'}
|
||||||
|
perf_data[f'cumulative_out'] = {'value': int(check_result["cumulative_out"]), 'warn': None, 'crit': None, 'min': 0, 'unit': 'B'}
|
||||||
|
|
||||||
perf_data[f'connections'] = {'value': int(check_result["connections"]), 'warn': conn_warn, 'crit': conn_crit, 'min': 0}
|
perf_data[f'connections'] = {'value': int(check_result["connections"]), 'warn': conn_warn, 'crit': conn_crit, 'min': 0}
|
||||||
|
|
||||||
text_result = ', '.join(f'{name}: {rate}' for name, rate in [*critical, *warn, *ok, ('cumulative_in', filesize(check_result["cumulative_in"])), ('cumulative_out', filesize(check_result["cumulative_out"]))])
|
text_result = ', '.join(f'{name}: {rate}' for name, rate in sorted([*critical, *warn, *ok, ('cumulative_in', filesize(check_result["cumulative_in"])), ('cumulative_out', filesize(check_result["cumulative_out"]))]))
|
||||||
print_icinga2_check_status(text_result, exit_code, perf_data)
|
print_icinga2_check_status(text_result, exit_code, perf_data)
|
||||||
sys.exit(exit_code)
|
sys.exit(exit_code)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue