diff options
Diffstat (limited to 'applications/luci-app-statistics/luasrc')
12 files changed, 59 insertions, 12 deletions
diff --git a/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua b/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua index ec26f02d0d..9a3850d683 100644 --- a/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua +++ b/applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua @@ -10,7 +10,7 @@ function index() require("luci.util") require("luci.statistics.datatree") - -- override entry(): check for existance <plugin>.so where <plugin> is derived from the called path + -- override entry(): check for existence <plugin>.so where <plugin> is derived from the called path function _entry( path, ... ) local file = path[5] or path[4] if nixio.fs.access( "/usr/lib/collectd/" .. file .. ".so" ) then @@ -29,6 +29,7 @@ function index() cpu = _("Processor"), cpufreq = _("CPU Frequency"), csv = _("CSV Output"), + curl = _("cUrl"), df = _("Disk Space Usage"), disk = _("Disk Usage"), dns = _("DNS"), @@ -63,7 +64,7 @@ function index() general = { "apcups", "contextswitch", "cpu", "cpufreq", "df", "disk", "email", "entropy", "exec", "irq", "load", "memory", "nut", "processes", "sensors", "thermal", "uptime" }, - network = { "conntrack", "dns", "interface", "iptables", + network = { "conntrack", "curl", "dns", "interface", "iptables", "netlink", "olsrd", "openvpn", "ping", "splash_leases", "tcpconns", "iwinfo" } } diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/curl.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/curl.lua new file mode 100644 index 0000000000..606e1cb0da --- /dev/null +++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/curl.lua @@ -0,0 +1,24 @@ +-- Copyright 2018 Chizhong Jin <pjincz@gmail.com> +-- Licensed to the public under the BSD 3-clause license + +m = Map("luci_statistics", + translate("cUrl Plugin Configuration")) + +s = m:section(NamedSection, "collectd_curl") +s_enable = s:option(Flag, "enable", translate("Enable this plugin")) +s_enable.default = 0 + +page = m:section(TypedSection, "collectd_curl_page") +page.addremove = true +page.anonymous = true +page.template = "cbi/tblsection" +page.sortable = true + +page_enable = page:option(Flag, "enable", translate("Enable")) +page_enable.default = 1 + +page_name = page:option(Value, "name", translate("Name")) + +page_addr = page:option(Value, "url", translate("URL")) + +return m diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/disk.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/disk.lua index dc3d3fb2be..d336a7e51c 100644 --- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/disk.lua +++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/disk.lua @@ -4,7 +4,7 @@ m = Map("luci_statistics", translate("Disk Plugin Configuration"), translate( - "The disk plugin collects detailled usage statistics " .. + "The disk plugin collects detailed usage statistics " .. "for selected partitions or whole disks." )) diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/dns.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/dns.lua index 29b998b877..dafcc452cc 100644 --- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/dns.lua +++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/dns.lua @@ -7,7 +7,7 @@ require("luci.sys") m = Map("luci_statistics", translate("DNS Plugin Configuration"), translate( - "The dns plugin collects detailled statistics about dns " .. + "The dns plugin collects detailed statistics about dns " .. "related traffic on selected interfaces." )) diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/exec.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/exec.lua index 48e0ec2d7a..9c8e3e1880 100644 --- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/exec.lua +++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/exec.lua @@ -51,8 +51,8 @@ notify = m:section( TypedSection, "collectd_exec_notify", translate( "Here you can define external commands which will be " .. "started by collectd when certain threshold values have " .. - "been reached. The values leading to invokation will be " .. - "feeded to the the called programs stdin." + "been reached. The values leading to invocation will be " .. + "fed to the the called programs stdin." )) notify.addremove = true notify.anonymous = true diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua index aa469843ec..ded3f7f996 100644 --- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua +++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/iptables.lua @@ -19,7 +19,7 @@ m = Map("luci_statistics", translate("Iptables Plugin Configuration"), translate( "The iptables plugin will monitor selected firewall rules and " .. - "collect informations about processed bytes and packets per rule." + "collect information about processed bytes and packets per rule." )) -- collectd_iptables config section diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/netlink.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/netlink.lua index 917abd0c43..66449ec467 100644 --- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/netlink.lua +++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/netlink.lua @@ -9,7 +9,7 @@ local devices = luci.sys.net.devices() m = Map("luci_statistics", translate("Netlink Plugin Configuration"), translate( - "The netlink plugin collects extended informations like " .. + "The netlink plugin collects extended information like " .. "qdisc-, class- and filter-statistics for selected interfaces." )) diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/processes.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/processes.lua index 4171a886b9..c0a18a9c1f 100644 --- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/processes.lua +++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/processes.lua @@ -4,7 +4,7 @@ m = Map("luci_statistics", translate("Processes Plugin Configuration"), translate( - "The processes plugin collects informations like cpu time, " .. + "The processes plugin collects information like cpu time, " .. "page faults and memory usage of selected processes." )) diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua index 3c650180aa..a02b2be4fd 100644 --- a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua +++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/tcpconns.lua @@ -4,7 +4,7 @@ m = Map("luci_statistics", translate("TCPConns Plugin Configuration"), translate( - "The tcpconns plugin collects informations about open tcp " .. + "The tcpconns plugin collects information about open tcp " .. "connections on selected ports." )) diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua new file mode 100644 index 0000000000..89a65a6b5f --- /dev/null +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua @@ -0,0 +1,22 @@ +-- Copyright 2018 Chizhong Jin <pjincz@gmail.com> +-- Licensed to the public under the BSD 3-clause license + +module("luci.statistics.rrdtool.definitions.curl", package.seeall) + +function rrdargs( graph, plugin, plugin_instance, dtype ) + return { + title = "%H: cUrl Response Time for #%pi", + y_min = "0", + alt_autoscale_max = true, + vlabel = "Response Time", + number_format = "%5.1lf%Ss", + data = { + types = { "response_time" }, + options = { + response_time = { + title = "" + } + } + } + } +end diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua index 6f687d218d..6ca65e539f 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/interface.lua @@ -17,7 +17,7 @@ function rrdargs( graph, plugin, plugin_instance ) -- diagram data description data = { - -- defined sources for data types, if ommitted assume a single DS named "value" (optional) + -- defined sources for data types, if omitted assume a single DS named "value" (optional) sources = { if_octets = { "tx", "rx" } }, diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua index 7b6acf3663..a612126ed0 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua @@ -14,7 +14,7 @@ function rrdargs( graph, plugin, plugin_instance ) -- diagram data description data = { - -- defined sources for data types, if ommitted assume a single DS named "value" (optional) + -- defined sources for data types, if omitted assume a single DS named "value" (optional) sources = { if_octets = { "tx", "rx" } }, |