From 452721e89aa679c53fab1b4197d041746c585ca1 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Fri, 21 Apr 2023 23:54:18 -0600 Subject: [PATCH] perfdata --- check_bandwidth.py | 2 +- install.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/check_bandwidth.py b/check_bandwidth.py index 00472e1..6d7dd47 100755 --- a/check_bandwidth.py +++ b/check_bandwidth.py @@ -53,7 +53,7 @@ for i in range(len(data)): else: ok.append(interface) data[i][2] = 'ok' - perf_data.append(f'{interface}={round(bandwidth_utilization, 2)}Mbps;{warn_value};{crit_value}; ') + perf_data.append(f'{interface}={round(bandwidth_utilization, 2)}MB;{warn_value};{crit_value}; ') if len(ok): print(f'OK: {", ".join(ok)}') diff --git a/install.sh b/install.sh index 65b9ccd..33f2577 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,8 @@ #!/bin/bash + +# apt update && apt install -y git && cd /opt && git -C /opt/icinga2-checks pull || git clone https://git.dp15.us/dpanzer/icinga2-checks.git /opt/icinga2-checks && bash /opt/icinga2-checks/install.sh +# @hourly /bin/bash /opt/icinga2-checks/install.sh + apt update apt install -y python3-venv git sysstat