check_opnsense_traffic_for_host: convert levels to int

This commit is contained in:
Cyberes 2023-09-09 12:29:12 -06:00
parent 3d6742384f
commit 6def1921c0
1 changed files with 2 additions and 2 deletions

View File

@ -123,8 +123,8 @@ def main():
print_icinga2_check_status(f'failed to parse traffic data: {e}\n{traceback.format_exc()}\n{traffic_data}', nagios.STATE_UNKNOWN)
sys.exit(nagios.UNKNOWN)
warn_b_value = (args.bandwidth * args.bandwidth_warn / 100) * 1e+6
crit_b_value = (args.bandwidth * args.bandwidth_crit / 100) * 1e+6
warn_b_value = int((args.bandwidth * args.bandwidth_warn / 100) * 1e+6)
crit_b_value = int((args.bandwidth * args.bandwidth_crit / 100) * 1e+6)
conn_warn = args.conn_warn if args.conn_warn > -1 else None
conn_crit = args.conn_crit if args.conn_crit > -1 else None