statistics: fix conntrack regression caused by collectd 5.5.0
authorHannu Nyman <hannu.nyman@iki.fi>
Tue, 18 Aug 2015 20:05:00 +0000 (23:05 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Tue, 18 Aug 2015 20:05:00 +0000 (23:05 +0300)
Collectd 5.5.0 introduced new data to conntrack plugin:
In addition to the number of tracked connections there is also
the static max conntrack value and the calculated use percentage.

Luci's conntrack plugin intrepretes "conntrack-max" as a new data instance
and includes it in the graph in addition to the real "conntrack" number.

Eliminate "max" from graph by specifying empty "" instance as data source.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua

index ee3d68f..fbc4773 100644 (file)
@@ -9,6 +9,10 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                vlabel = "Count",
                number_format = "%5.0lf",
                data = {
+                       -- collectd 5.5+: specify "" to exclude "max" instance
+                       instances = {
+                               conntrack = { "" }
+                       },
                        sources = {
                                conntrack = { "value" }
                        },