summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics/luasrc/statistics
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-10-05 15:13:44 +0200
committerJo-Philipp Wich <jow@openwrt.org>2015-10-05 15:13:44 +0200
commitcff2b99b4f9af0957ff6de4fe1ce48d30337b41b (patch)
treee52304fea0076c09e21d78c825a217aa47f236c5 /applications/luci-app-statistics/luasrc/statistics
parent56deb7b2cf5f295b264f245debb03b19716e84a7 (diff)
luci-app-statistics: add initial support for collect-mod-sensors
Due to a lack of a test environment this support only covers thermal graphs so far. Please send the output of "rrdtool info /tmp/rrd/*/sensors-*/*.rrd" if your system happens to support voltage, power or fanspeed sensors. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'applications/luci-app-statistics/luasrc/statistics')
-rw-r--r--applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua
new file mode 100644
index 000000000..f8bddb96e
--- /dev/null
+++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua
@@ -0,0 +1,24 @@
+-- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
+-- Licensed to the public under the Apache License 2.0.
+
+module("luci.statistics.rrdtool.definitions.sensors", package.seeall)
+
+function rrdargs( graph, plugin, plugin_instance )
+ return {
+ {
+ per_instance = true,
+ title = "%H: %pi - %di",
+ vlabel = "\176C",
+ number_format = "%4.1lf\176C",
+ data = {
+ types = { "temperature" },
+ options = {
+ temperature__value = {
+ color = "ff0000",
+ title = "Temperature"
+ }
+ }
+ }
+ }
+ }
+end