improve formatting

This commit is contained in:
Cyberes 2023-05-03 12:12:07 -06:00
parent 9f9cef96fe
commit cb9dd021ff
1 changed files with 10 additions and 8 deletions

View File

@ -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)