collectd: remove the patch scaling ping_droprate from 0-1 to 0-100

Upstream project's behaviour of reporting this data source in range 0-1
is used by at least CentOS 7 collectd 5.8.1, very likely the same
behaviour is also in widely use by other distributions.

The change is important for providing consistent experience across
collectd deployments on different environments

Ref: https://github.com/collectd/collectd/pull/3244
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry picked from commit 2f66fa5c23)
Ref: https://github.com/openwrt/luci/issues/3308
This commit is contained in:
Yousong Zhou 2019-08-09 13:32:56 +00:00
parent 84756e7f60
commit 2a64b3a440
2 changed files with 1 additions and 12 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=collectd
PKG_VERSION:=5.9.0
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://collectd.org/files/ \

View file

@ -1,11 +0,0 @@
--- a/src/ping.c
+++ b/src/ping.c
@@ -648,7 +648,7 @@ static int ping_read(void) /* {{{ */
((double)(pkg_recv * (pkg_recv - 1))));
/* Calculate drop rate. */
- droprate = ((double)(pkg_sent - pkg_recv)) / ((double)pkg_sent);
+ droprate = ((double)(pkg_sent - pkg_recv)) * 100 / ((double)pkg_sent);
submit(hl->host, "ping", latency_average);
submit(hl->host, "ping_stddev", latency_stddev);