improve formatting
This commit is contained in:
parent
9f9cef96fe
commit
cb9dd021ff
|
@ -87,8 +87,10 @@ def main():
|
|||
'cumulative_out': np.average([x['cumulative_bytes_out'] for x in traffic_data]),
|
||||
'connections': int(np.average([len(x['details']) for x in traffic_data]))
|
||||
}
|
||||
except:
|
||||
print('Failed to parse traffic data.')
|
||||
except Exception as e:
|
||||
print(f'UNKNOWN: Failed to parse traffic data: "{e}"')
|
||||
print(traceback.format_exc())
|
||||
print('\nRaw data:')
|
||||
print(traffic_data)
|
||||
sys.exit(nagios.UNKNOWN)
|
||||
|
||||
|
|
Loading…
Reference in New Issue