From 35631e4bc8310490be5db16eff318f2dc76a3a69 Mon Sep 17 00:00:00 2001 From: Andreas Billmeier Date: Sun, 18 Jul 2021 13:08:51 +0200 Subject: [PATCH] test group bandwidth --- check_openvpn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/check_openvpn b/check_openvpn index 2b191ee..e179252 100755 --- a/check_openvpn +++ b/check_openvpn @@ -103,13 +103,27 @@ def main(): performancedata['k_clients'] = 0 performancedata['e_clients'] = 0 performancedata['o_clients'] = 0 + performancedata['k_in'] = 0 + performancedata['k_out'] = 0 + performancedata['e_in'] = 0 + performancedata['e_out'] = 0 + performancedata['o_in'] = 0 + performancedata['o_out'] = 0 + i = 0 for cn in clients['Common Name']: if cn.startswith("k_"): performancedata['k_clients'] += 1 + performancedata['k_in'] += int(clients['Bytes Received'][i]) + performancedata['k_out'] += int(clients['Bytes Sent'][i]) elif cn.startswith("e_"): performancedata['e_clients'] +=1 + performancedata['e_in'] += int(clients['Bytes Received'][i]) + performancedata['e_out'] += int(clients['Bytes Sent'][i]) else: performancedata['o_clients'] +=1 + performancedata['o_in'] += int(clients['Bytes Received'][i]) + performancedata['o_out'] += int(clients['Bytes Sent'][i]) + i += 1 # add performancedata # 'label'=value[UOM];[warn];[crit];[min];[max]