luci/applications/luci-app-statistics/luasrc
Kevin Locke 1bbc419e7a luci-app-statistics: quote : in filenames for DEF
: is used to delimit fields in DEF: rrd instructions, so when it appears
in a filename it must be escaped using \.[1]  This commit adds the
escaping.

I discovered the issue after configuring collectd-mod-ping to monitor an
IPv6 host (2001:19f0:5:727:5b56:205d:ff55:2208).  Accessing
https://192.168.0.1/cgi-bin/luci/admin/statistics/graph/ping would cause
the following messages to be logged:

    Wed Nov 14 23:04:33 2018 daemon.err uhttpd[30261]: ERROR: can't parse DEF '2ping_avg_raw=/tmp/rrd/openwrthost/ping/ping-2001:19f0:5:727:5b56:205d:ff55:2208.rrd:value:AVERAGE' -2
    Wed Nov 14 23:04:33 2018 daemon.err uhttpd[30261]: ERROR: can't parse DEF '2ping_droprate_avg_raw=/tmp/rrd/openwrthost/ping/ping_droprate-2001:19f0:5:727:5b56:205d:ff55:2208.rrd:value:AVERAGE' -2

and the graphs would not display.  After applying this commit, the
graphs display correctly and no messages are logged.

1.  https://oss.oetiker.ch/rrdtool/doc/rrdgraph_data.en.html#IDEF

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2018-11-14 16:55:24 -07:00
..
controller/luci_statistics Merge pull request #2209 from jinchizhong/luci-app-statistics-add-curl 2018-10-13 22:02:42 +03:00
model/cbi/luci_statistics Merge pull request #2209 from jinchizhong/luci-app-statistics-add-curl 2018-10-13 22:02:42 +03:00
statistics luci-app-statistics: quote : in filenames for DEF 2018-11-14 16:55:24 -07:00
view luci-app-statistics: remove non-functional links from graphs 2017-02-13 19:10:51 +02:00