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.
In order to do re-resolve "gateway", the only way is to restart collectd.
Fixes: #13522 Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- 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
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/initscripts/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
Acked-by: Peter Müller peter.mueller@ipfire.org
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.
In order to do re-resolve "gateway", the only way is to restart collectd.
Fixes: #13522 Signed-off-by: Michael Tremer michael.tremer@ipfire.org
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
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/initscripts/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