statistics: Add support for entropy stats
Add statistics on the available entropy. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
parent
084d435060
commit
7df0df48c0
5 changed files with 44 additions and 1 deletions
|
@ -30,6 +30,7 @@ function index()
|
|||
disk = _("Disk Usage"),
|
||||
dns = _("DNS"),
|
||||
email = _("Email"),
|
||||
entropy = _("Entropy"),
|
||||
exec = _("Exec"),
|
||||
interface = _("Interfaces"),
|
||||
iptables = _("Firewall"),
|
||||
|
@ -53,7 +54,7 @@ function index()
|
|||
-- our collectd menu
|
||||
local collectd_menu = {
|
||||
output = { "csv", "network", "rrdtool", "unixsock" },
|
||||
system = { "cpu", "df", "disk", "email", "exec", "irq", "load", "memory", "nut", "processes", "uptime" },
|
||||
system = { "cpu", "df", "disk", "email", "entropy", "exec", "irq", "load", "memory", "nut", "processes", "uptime" },
|
||||
network = { "conntrack", "dns", "interface", "iptables", "netlink", "olsrd", "ping", "splash_leases", "tcpconns", "iwinfo" }
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
-- Copyright 2015 Hannu Nyman <hannu.nyman@iki.fi>
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
m = Map("luci_statistics",
|
||||
translate("Entropy Plugin Configuration"),
|
||||
translate("The entropy plugin collects statistics about the available entropy."))
|
||||
|
||||
s = m:section( NamedSection, "collectd_entropy", "luci_statistics" )
|
||||
|
||||
enable = s:option( Flag, "enable", translate("Enable this plugin") )
|
||||
enable.default = 0
|
||||
|
||||
return m
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
-- Copyright 2015 Hannu Nyman <hannu.nyman@iki.fi>
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
module("luci.statistics.rrdtool.definitions.entropy", package.seeall)
|
||||
|
||||
function rrdargs( graph, plugin, plugin_instance, dtype )
|
||||
|
||||
return {
|
||||
title = "%H: Available entropy",
|
||||
vlabel = "bits",
|
||||
number_format = "%4.0lf",
|
||||
data = {
|
||||
types = { "entropy" },
|
||||
options = { entropy = { title = "Entropy %di" } }
|
||||
}
|
||||
}
|
||||
|
||||
end
|
||||
|
|
@ -45,6 +45,9 @@ config 'statistics' 'collectd_email'
|
|||
option 'SocketFile' '/var/run/collectd/email.sock'
|
||||
option 'SocketGroup' 'nogroup'
|
||||
|
||||
config 'statistics' 'collectd_entropy'
|
||||
option 'enable' '0'
|
||||
|
||||
config 'statistics' 'collectd_exec'
|
||||
option 'enable' '0'
|
||||
|
||||
|
|
|
@ -303,6 +303,12 @@ plugins = {
|
|||
{ }
|
||||
},
|
||||
|
||||
entropy = {
|
||||
{ },
|
||||
{ },
|
||||
{ }
|
||||
},
|
||||
|
||||
exec = config_exec,
|
||||
|
||||
interface = {
|
||||
|
|
Loading…
Reference in a new issue