check_speedtest: fix levels
This commit is contained in:
parent
dfc77a2f4d
commit
d3c6d61b6b
|
@ -39,20 +39,20 @@ def main():
|
|||
|
||||
exit_code = nagios.OK
|
||||
|
||||
if speedtest_results['90th_percentile_upload_speed']['value'] <= args.warn_up and exit_code < nagios.WARNING:
|
||||
exit_code = nagios.WARNING
|
||||
elif speedtest_results['90th_percentile_upload_speed']['value'] <= args.critical_up and exit_code < nagios.CRITICAL:
|
||||
if speedtest_results['90th_percentile_upload_speed']['value'] <= args.critical_up and exit_code < nagios.CRITICAL:
|
||||
exit_code = nagios.CRITICAL
|
||||
elif speedtest_results['90th_percentile_upload_speed']['value'] <= args.warn_up and exit_code < nagios.WARNING:
|
||||
exit_code = nagios.WARNING
|
||||
|
||||
if speedtest_results['90th_percentile_download_speed']['value'] <= args.warn_down and exit_code < nagios.WARNING:
|
||||
exit_code = nagios.WARNING
|
||||
elif speedtest_results['90th_percentile_download_speed']['value'] <= args.critical_down and exit_code < nagios.CRITICAL:
|
||||
if speedtest_results['90th_percentile_download_speed']['value'] <= args.critical_down and exit_code < nagios.CRITICAL:
|
||||
exit_code = nagios.CRITICAL
|
||||
elif speedtest_results['90th_percentile_download_speed']['value'] <= args.warn_down and exit_code < nagios.WARNING:
|
||||
exit_code = nagios.WARNING
|
||||
|
||||
if speedtest_results['latency_ms']['value'] >= args.warn_latency and exit_code < nagios.WARNING:
|
||||
exit_code = nagios.WARNING
|
||||
elif speedtest_results['latency_ms']['value'] >= args.warn_latency and exit_code < nagios.CRITICAL:
|
||||
if speedtest_results['latency_ms']['value'] >= args.warn_latency and exit_code < nagios.CRITICAL:
|
||||
exit_code = nagios.CRITICAL
|
||||
elif speedtest_results['latency_ms']['value'] >= args.warn_latency and exit_code < nagios.WARNING:
|
||||
exit_code = nagios.WARNING
|
||||
|
||||
if exit_code == nagios.OK:
|
||||
status_str = 'OK'
|
||||
|
|
Loading…
Reference in New Issue