From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH 2/2] zabbix_agentd: Fix ipfire.net.gateway.ping Date: Fri, 27 Oct 2023 21:49:01 +0200 Message-ID: <20231027194901.31387-1-robin.roevens@disroot.org> In-Reply-To: <20231027194056.29039-1-robin.roevens@disroot.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6732983077504273465==" List-Id: --===============6732983077504273465== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Fixes custom IPFire Zabbix Agent userparameter ipfire.net.gateway.ping returning 1 (success) when fping failed for other reasons (rc 2,3 or 4) than host unreachable (rc 0). --- config/zabbix_agentd/userparameter_ipfire.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/zabbix_agentd/userparameter_ipfire.conf b/config/zabbix_a= gentd/userparameter_ipfire.conf index b8b512d82..ba0c6c2ca 100644 --- a/config/zabbix_agentd/userparameter_ipfire.conf +++ b/config/zabbix_agentd/userparameter_ipfire.conf @@ -3,7 +3,7 @@ # Internet Gateway ping timings, can be used to measure "Internet Line Quali= ty" UserParameter=3Dipfire.net.gateway.pingtime,sudo /usr/sbin/fping -c 3 gatewa= y 2>&1 | tail -n 1 | awk '{print $NF}' | cut -d '/' -f2 # Internet Gateway availability, can be used to check Internet connection -UserParameter=3Dipfire.net.gateway.ping,sudo /usr/sbin/fping -q -r 3 gateway= ; [ ! $? ]; echo $? +UserParameter=3Dipfire.net.gateway.ping,sudo /usr/sbin/fping -q -r 3 gateway= ; [ ! $? =3D=3D 0 ]; echo $? # Firewall Filter Forward chain drops in bytes/chain (JSON), can be used for= discovery of firewall chains and monitoring of firewall hits on each chain UserParameter=3Dipfire.net.fw.hits.raw,sudo /usr/local/bin/getipstat -xf | g= rep "/\* DROP_.* \*/$" | awk 'BEGIN { ORS =3D ""; print "["} { printf "%s{\"c= hain\": \"%s\", \"bytes\": \"%s\"}", separator, substr($11, 6), $2; separator= =3D ", "; } END { print"]" }' # Number of currently Active DHCP leases --=20 2.41.0 --=20 Dit bericht is gescanned op virussen en andere gevaarlijke inhoud door MailScanner en lijkt schoon te zijn. --===============6732983077504273465==--