From a654a8e14c35c9854ab0372d96744599df95bc0a Mon Sep 17 00:00:00 2001 From: Cyberes Date: Fri, 21 Apr 2023 23:54:20 -0600 Subject: [PATCH] fix perfdata for opnsense --- check_opnsense_traffic_for_host.py | 10 +++++----- install.sh | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/check_opnsense_traffic_for_host.py b/check_opnsense_traffic_for_host.py index 6d158c9..f68b07b 100755 --- a/check_opnsense_traffic_for_host.py +++ b/check_opnsense_traffic_for_host.py @@ -98,11 +98,11 @@ def main(): ok.append(name) status = '[OK]' - perf_data.append(f'{name}-rate_in={filesize(data["rate_in"], spaces=False)};{warn_value};{crit_value};0') - perf_data.append(f'{name}-rate_out={filesize(data["rate_out"], spaces=False)};{warn_value};{crit_value};0') - perf_data.append(f'{name}-cumulative_in={filesize(data["cumulative_in"], spaces=False)};{warn_value};{crit_value};0') - perf_data.append(f'{name}-cumulative_out={filesize(data["cumulative_out"], spaces=False)};{warn_value};{crit_value};0') - perf_data.append(f'{name}-connections={data["connections"]};{warn_value};{crit_value};0') + perf_data.append(f'{name}-rate_in={filesize(data["rate_in"], spaces=False)};{warn_value};{crit_value};0; ') + perf_data.append(f'{name}-rate_out={filesize(data["rate_out"], spaces=False)};{warn_value};{crit_value};0;') + perf_data.append(f'{name}-cumulative_in={filesize(data["cumulative_in"], spaces=False)};{warn_value};{crit_value};0;') + perf_data.append(f'{name}-cumulative_out={filesize(data["cumulative_out"], spaces=False)};{warn_value};{crit_value};0;') + perf_data.append(f'{name}-connections={data["connections"]};{warn_value};{crit_value};0;') output_table = [ ('Host', 'Interface', 'Rate In', 'Rate Out', 'Cumulative In', 'Cumulative Out', 'Connections', 'Status'), diff --git a/install.sh b/install.sh index b196c13..747cf30 100755 --- a/install.sh +++ b/install.sh @@ -43,8 +43,6 @@ ln_existing /opt/icinga2-checks/check_iowait.sh /usr/lib64/nagios/plugins/check_ ln_existing /opt/icinga2-checks/check_bandwidth.py /usr/lib64/nagios/plugins/check_bandwidth ln_existing /opt/icinga2-checks/check_curl.sh /usr/lib64/nagios/plugins/check_curl -ln_existing /etc/ssl/certs/ca-certificates.crt /opt/venvs/icinga2_checks/lib/python3.10/site-packages/certifi/cacert.pem - # ============================================================================== # Install the Linuxfabrik checks @@ -72,4 +70,6 @@ ln_existing /opt/linuxfabrik-monitoring-plugins/check-plugins/disk-smart/disk-sm setcap cap_net_raw+ep /usr/lib/nagios/plugins/check_icmp setcap cap_net_raw+ep /usr/lib/nagios/plugins/check_ping -setcap 'cap_net_raw+ep' "$(which ping)" \ No newline at end of file +setcap 'cap_net_raw+ep' "$(which ping)" + +ln_existing /etc/ssl/certs/ca-certificates.crt /opt/venvs/icinga2_checks/lib/python3.10/site-packages/certifi/cacert.pem