luci-app-statistics: add advice about data directory permissions
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / rrdtool.lua
index b3bdf87..fa00bbb 100644 (file)
@@ -19,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
@@ -47,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") )