From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= To: development@lists.ipfire.org Subject: Re: [PATCH] collectd: Restart is required after reconnect Date: Sun, 14 Jan 2024 16:02:49 +0000 Message-ID: <73657096-6c02-4b3f-b72d-6b6d9b142a4a@ipfire.org> In-Reply-To: <20240112132904.4135555-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2506953106461916728==" List-Id: --===============2506953106461916728== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Acked-by: Peter M=C3=BCller > The "ping" plugin does not re-resolve the gateway IP address after > pinging it for the first time. For most people this won't be a big > problem, but if the default gateway changes, the latency graph won't > work any more. >=20 > In order to do re-resolve "gateway", the only way is to restart > collectd. >=20 > Fixes: #13522 > Signed-off-by: Michael Tremer > --- > config/rootfiles/common/aarch64/initscripts | 1 + > config/rootfiles/common/riscv64/initscripts | 1 + > config/rootfiles/common/x86_64/initscripts | 1 + > src/initscripts/networking/red.up/60-collectd | 6 ++++++ > 4 files changed, 9 insertions(+) > create mode 100644 src/initscripts/networking/red.up/60-collectd >=20 > diff --git a/config/rootfiles/common/aarch64/initscripts b/config/rootfiles= /common/aarch64/initscripts > index f025651c3..a988b4abc 100644 > --- a/config/rootfiles/common/aarch64/initscripts > +++ b/config/rootfiles/common/aarch64/initscripts > @@ -62,6 +62,7 @@ etc/rc.d/init.d/networking/red.up/30-ddns > #etc/rc.d/init.d/networking/red.up/35-guardian > etc/rc.d/init.d/networking/red.up/50-ipsec > etc/rc.d/init.d/networking/red.up/50-ovpn > +etc/rc.d/init.d/networking/red.up/60-collectd > etc/rc.d/init.d/networking/red.up/98-leds > etc/rc.d/init.d/networking/red.up/99-beep > etc/rc.d/init.d/networking/red.up/99-fireinfo > diff --git a/config/rootfiles/common/riscv64/initscripts b/config/rootfiles= /common/riscv64/initscripts > index 8a4f046d3..a5e1596fb 100644 > --- a/config/rootfiles/common/riscv64/initscripts > +++ b/config/rootfiles/common/riscv64/initscripts > @@ -62,6 +62,7 @@ etc/rc.d/init.d/networking/red.up/30-ddns > #etc/rc.d/init.d/networking/red.up/35-guardian > etc/rc.d/init.d/networking/red.up/50-ipsec > etc/rc.d/init.d/networking/red.up/50-ovpn > +etc/rc.d/init.d/networking/red.up/60-collectd > etc/rc.d/init.d/networking/red.up/98-leds > etc/rc.d/init.d/networking/red.up/99-beep > etc/rc.d/init.d/networking/red.up/99-fireinfo > diff --git a/config/rootfiles/common/x86_64/initscripts b/config/rootfiles/= common/x86_64/initscripts > index 8a4f046d3..a5e1596fb 100644 > --- a/config/rootfiles/common/x86_64/initscripts > +++ b/config/rootfiles/common/x86_64/initscripts > @@ -62,6 +62,7 @@ etc/rc.d/init.d/networking/red.up/30-ddns > #etc/rc.d/init.d/networking/red.up/35-guardian > etc/rc.d/init.d/networking/red.up/50-ipsec > etc/rc.d/init.d/networking/red.up/50-ovpn > +etc/rc.d/init.d/networking/red.up/60-collectd > etc/rc.d/init.d/networking/red.up/98-leds > etc/rc.d/init.d/networking/red.up/99-beep > etc/rc.d/init.d/networking/red.up/99-fireinfo > diff --git a/src/initscripts/networking/red.up/60-collectd b/src/initscript= s/networking/red.up/60-collectd > new file mode 100644 > index 000000000..0e457894f > --- /dev/null > +++ b/src/initscripts/networking/red.up/60-collectd > @@ -0,0 +1,6 @@ > +#!/bin/bash > + > +# Restart collectd because the ping plugin does not re-resolve "gateway" > +exec /etc/init.d/collectd restart > + > +exit 1 --===============2506953106461916728==--