statistics: Add support for entropy stats
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / tcpconns.lua
1 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
2 -- Licensed to the public under the Apache License 2.0.
3
4 m = Map("luci_statistics",
5         translate("TCPConns Plugin Configuration"),
6         translate(
7                 "The tcpconns plugin collects informations about open tcp " ..
8                 "connections on selected ports."
9         ))
10
11 -- collectd_tcpconns config section
12 s = m:section( NamedSection, "collectd_tcpconns", "luci_statistics" )
13
14 -- collectd_tcpconns.enable
15 enable = s:option( Flag, "enable", translate("Enable this plugin") )
16 enable.default = 0
17
18 -- collectd_tcpconns.listeningports (ListeningPorts)
19 listeningports = s:option( Flag, "ListeningPorts", translate("Monitor all local listen ports") )
20 listeningports.default = 1
21 listeningports:depends( "enable", 1 )
22
23 -- collectd_tcpconns.localports (LocalPort)
24 localports = s:option( Value, "LocalPorts", translate("Monitor local ports") )
25 localports.optional = true
26 localports:depends( "enable", 1 )
27
28 -- collectd_tcpconns.remoteports (RemotePort)
29 remoteports = s:option( Value, "RemotePorts", translate("Monitor remote ports") )
30 remoteports.optional = true
31 remoteports:depends( "enable", 1 )
32
33 return m