summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2023-11-15 17:58:38 +0200
committerGitHub <noreply@github.com>2023-11-15 17:58:38 +0200
commit30ddf41f2161e76c9cdd7a850ea896c36a869d8e (patch)
tree7dacf755c4855e1f0bf4986abfb06c17763f912f
parent89033b09aa448bb207f5b329f0c66d5365a22ed8 (diff)
fix proc net dev: keep iface speed chart var in Mbits (#16418)
-rw-r--r--collectors/proc.plugin/proc_net_dev.c2
-rw-r--r--health/health.d/net.conf4
2 files changed, 3 insertions, 3 deletions
diff --git a/collectors/proc.plugin/proc_net_dev.c b/collectors/proc.plugin/proc_net_dev.c
index da7120cf3a..f7b2f26103 100644
--- a/collectors/proc.plugin/proc_net_dev.c
+++ b/collectors/proc.plugin/proc_net_dev.c
@@ -1446,7 +1446,7 @@ int do_proc_net_dev(int update_every, usec_t dt) {
}
rrdsetvar_custom_chart_variable_set(
- d->st_bandwidth, d->chart_var_speed, (NETDATA_DOUBLE)d->speed * KILOBITS_IN_A_MEGABIT);
+ d->st_bandwidth, d->chart_var_speed, (NETDATA_DOUBLE)d->speed);
if (d->speed) {
d->speed_file_exists = 1;
diff --git a/health/health.d/net.conf b/health/health.d/net.conf
index ea49541874..59ff7167e9 100644
--- a/health/health.d/net.conf
+++ b/health/health.d/net.conf
@@ -24,7 +24,7 @@ component: Network
os: linux
hosts: *
lookup: average -1m unaligned absolute of received
- calc: ($interface_speed > 0) ? ($this * 100 / ($interface_speed)) : ( nan )
+ calc: ($interface_speed > 0) ? ($this * 100 / ($interface_speed * 1000)) : ( nan )
units: %
every: 10s
warn: $this > (($status >= $WARNING) ? (85) : (90))
@@ -41,7 +41,7 @@ component: Network
os: linux
hosts: *
lookup: average -1m unaligned absolute of sent
- calc: ($interface_speed > 0) ? ($this * 100 / ($interface_speed)) : ( nan )
+ calc: ($interface_speed > 0) ? ($this * 100 / ($interface_speed * 1000)) : ( nan )
units: %
every: 10s
warn: $this > (($status >= $WARNING) ? (85) : (90))