From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: [PATCH 2/3] Bugfix: compatibility with grep 3.8+ Date: Mon, 03 Apr 2023 18:35:33 +0200 Message-ID: <62a8edfa-2820-2807-630f-fc0addab0ecc@ipfire.org> In-Reply-To: <20230402110711.19593-3-robin.roevens@disroot.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6921204586941632174==" List-Id: --===============6921204586941632174== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reviewed-by: Adolf Belka On 02/04/2023 13:07, Robin Roevens wrote: > Fix "grep: warning: stray \ before /" message on > Zabbix Agent ipfire.net.fw.hits item introduced by > grep 3.8 in > https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dcommit;h=3D40b5df39421497385= 29c22c9cfcd067cd672b605 > > Signed-off-by: Robin Roevens > --- > 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= _agentd/userparameter_ipfire.conf > index 10c09c25d..c5a636edf 100644 > --- a/config/zabbix_agentd/userparameter_ipfire.conf > +++ b/config/zabbix_agentd/userparameter_ipfire.conf > @@ -5,7 +5,7 @@ UserParameter=3Dipfire.net.gateway.pingtime,sudo /usr/sbin/= fping -c 3 gateway 2>&1 > # Internet Gateway availability, can be used to check Internet connection > UserParameter=3Dipfire.net.gateway.ping,sudo /usr/sbin/fping -q -r 3 gate= way; [ ! $? ]; 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 |= grep "\/\* DROP_.* \*\/$" | awk 'BEGIN { ORS =3D ""; print "["} { printf "%s= {\"chain\": \"%s\", \"bytes\": \"%s\"}", separator, substr($11, 6), $2; separ= ator =3D ", "; } END { print"]" }' > +UserParameter=3Dipfire.net.fw.hits.raw,sudo /usr/local/bin/getipstat -xf |= grep "/\* DROP_.* \*/$" | awk 'BEGIN { ORS =3D ""; print "["} { printf "%s{\= "chain\": \"%s\", \"bytes\": \"%s\"}", separator, substr($11, 6), $2; separat= or =3D ", "; } END { print"]" }' > # Number of currently Active DHCP leases > UserParameter=3Dipfire.dhcpd.clients,grep -s -E 'lease|bind' /var/state/d= hcp/dhcpd.leases | sed ':a;/{$/{N;s/\n//;ba}' | grep "state active" | wc -l > # Number of Captive Portal clients --===============6921204586941632174==--