luci-app-statistics: add advice about data directory permissions
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / rrdtool.lua
index 7571634..fa00bbb 100644 (file)
@@ -1,17 +1,5 @@
---[[
-
-Luci configuration model for statistics - collectd rrdtool plugin configuration
-(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-$Id$
-
-]]--
+-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
+-- Licensed to the public under the Apache License 2.0.
 
 m = Map("luci_statistics",
        translate("RRDTool Plugin Configuration"),
@@ -31,7 +19,12 @@ enable = s:option( Flag, "enable", translate("Enable this plugin") )
 enable.default = 1
 
 -- collectd_rrdtool.datadir (DataDir)
-datadir = s:option( Value, "DataDir", translate("Storage directory") )
+datadir = s:option( Value, "DataDir",
+       translate("Storage directory"),
+       translate("Note: as pages are rendered by user 'nobody', the *.rrd files, " ..
+                 "the storage directory and all its parent directories need " ..
+                 "to be world readable."
+       ))
 datadir.default  = "/tmp"
 datadir.rmempty  = true
 datadir.optional = true
@@ -59,10 +52,16 @@ heartbeat:depends( "enable", 1 )
 rrasingle = s:option( Flag, "RRASingle",
        translate("Only create average RRAs"), translate("reduces rrd size") )
 rrasingle.default  = true
-rrasingle.rmempty  = true
-rrasingle.optional = true
 rrasingle:depends( "enable", 1 )
 
+-- collectd_rrdtool.rramax (RRAMax)
+rramax = s:option( Flag, "RRAMax",
+       translate("Show max values instead of averages"),
+       translate("Max values for a period can be used instead of averages when not using 'only average RRAs'") )
+rramax.default  = false
+rramax.rmempty  = true
+rramax:depends( "RRASingle", 0 )
+
 -- collectd_rrdtool.rratimespans (RRATimespan)
 rratimespans = s:option( Value, "RRATimespans",
        translate("Stored timespans"), translate("seconds; multiple separated by space") )