1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
4 m = Map("luci_statistics",
5 translate("CPU Plugin Configuration"),
6 translate("The cpu plugin collects basic statistics about the processor usage."))
8 -- collectd_cpu config section
9 s = m:section( NamedSection, "collectd_cpu", "luci_statistics" )
11 -- collectd_cpu.enable
12 enable = s:option( Flag, "enable", translate("Enable this plugin") )
15 -- collectd_cpu.reportbycpu (ReportByCpu)
16 reportbycpu = s:option( Flag, "ReportByCpu",
17 translate("Report by CPU"),
18 translate("By setting this, CPU is not aggregate of all processors on the system"))
19 reportbycpu.default = 1
20 reportbycpu:depends( "enable", 1 )
22 -- collectd_cpu.reportbystate (ReportByState)
23 reportbystate = s:option( Flag, "ReportByState",
24 translate("Report by state"),
25 translate("When set to true, reports per-state metric (system, user, idle)"))
26 reportbystate.default = 1
27 reportbystate:depends( "enable", 1 )
29 -- collectd_cpu.valuespercentage (ValuesPercentage)
30 valuespercentage = s:option( Flag, "ValuesPercentage",
31 translate("Report in percent"),
32 translate("When set to true, we request percentage values"))
33 valuespercentage.default = 0
34 valuespercentage:depends({ enable = 1, ReportByCpu = 1, ReportByState = 1 })