Adjust the defaults shown in the LuCI user interface to match
the real default values in the default config file.
(If a plugin is disabled and config values get deleted from
the config file, user has been offered incorrect default
values from UI defaults when the plugin is later re-enabled.)
* email: socket in /var/run/collectd/ dir
* ping: TTL 127
* rrdtool: 3600 sec (1hour) as shortest period, 144 RRArows
* unixsock: socket in /var/run/collectd/ dir
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(Backported and adapted from commit
f7e5b56649)
-- collectd_email.socketfile (SocketFile)
socketfile = s:option( Value, "SocketFile", translate("Socket file") )
-socketfile.default = "/var/run/collect-email.sock"
+socketfile.default = "/var/run/collectd/email.sock"
socketfile:depends( "enable", 1 )
-- collectd_email.socketgroup (SocketGroup)
-- collectd_ping.ttl (TTL)
ttl = s:option( Value, "TTL", translate("TTL for ping packets") )
ttl.isinteger = true
-ttl.default = 128
+ttl.default = 127
ttl:depends( "enable", 1 )
-- collectd_ping.interval (Interval)
-- collectd_rrdtool.rratimespans (RRATimespan)
rratimespans = s:option( Value, "RRATimespans",
translate("Stored timespans"), translate("seconds; multiple separated by space") )
-rratimespans.default = "600 86400 604800 2678400 31622400"
+rratimespans.default = "3600 86400 604800 2678400 31622400"
rratimespans.rmempty = true
rratimespans.optional = true
rratimespans:depends( "enable", 1 )
-- collectd_rrdtool.rrarows (RRARows)
rrarows = s:option( Value, "RRARows", translate("Rows per RRA") )
rrarows.isinteger = true
-rrarows.default = 100
+rrarows.default = 144
rrarows.rmempty = true
rrarows.optional = true
rrarows:depends( "enable", 1 )
-- collectd_unixsock.socketfile (SocketFile)
socketfile = s:option( Value, "SocketFile" )
-socketfile.default = "/var/run/collect-query.socket"
+socketfile.default = "/var/run/collectd/query.sock"
socketfile:depends( "enable", 1 )
-- collectd_unixsock.socketgroup (SocketGroup)