From c800004c7c7cb70c665cd42c3745a529b9ca945d Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sun, 11 Sep 2022 00:25:29 +0200 Subject: fix check_openvpn_status --- plugins/check_openvpn_status | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') 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']))) -- cgit v1.2.3