aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/check_openvpn_status2
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'])))