diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2022-09-11 00:25:29 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2022-09-11 00:25:29 +0200 |
commit | c800004c7c7cb70c665cd42c3745a529b9ca945d (patch) | |
tree | 5134451fa3d5d613a80ba6bca787b904eee88349 | |
parent | 0779f9e707d205f5cecb9a828174d9545cfba433 (diff) | |
download | monitoring_custom-c800004c7c7cb70c665cd42c3745a529b9ca945d.tar.gz |
fix check_openvpn_status
-rwxr-xr-x | plugins/check_openvpn_status | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/check_openvpn_status b/plugins/check_openvpn_status index 1a74eef..f049ef7 100755 --- a/plugins/check_openvpn_status +++ b/plugins/check_openvpn_status @@ -69,6 +69,8 @@ if status_age > 120: STATUS = set_status(Status.UNKNOWN) STATUS_STRINGS.append(f'Statusfile is {status_age} seconds old. This should be no more than 60.') +if 'CLIENT_LIST' not in DATA: + DATA['CLIENT_LIST'] = [] if args.max_conns > 0: clients = ', '.join(list(map(lambda x: x[0], DATA['CLIENT_LIST']))) |