commit 4f6198094cf4134179d1f9c9fa8f79759a27c87e
[project/luci.git] / applications / luci-statistics / luasrc / statistics / rrdtool / definitions / tcpconns / tcp_connections.lua
1 module("luci.statistics.rrdtool.definitions.tcpconns.tcp_connections", package.seeall)
2
3 function rrdargs( graph, host, plugin, plugin_instance, dtype )
4
5 dtype_instances = {
6 "SYN_SENT", "SYN_RECV", "LISTEN", "ESTABLISHED", "LAST_ACK", "TIME_WAIT",
7 "CLOSING", "CLOSE_WAIT", "CLOSED", "FIN_WAIT1", "FIN_WAIT2"
8 }
9
10 opts = { }
11 opts.sources = { }
12 opts.image = graph:mkpngpath( host, plugin, plugin_instance, dtype )
13 opts.title = host .. ": TCP-Verbindungen - Port " .. plugin_instance
14 opts.rrd = { "-v", "Anzahl" }
15 opts.colors = {
16
17 }
18
19 for i, inst in ipairs(dtype_instances) do
20 opts.sources[i] = {
21 name = inst,
22 rrd = graph:mkrrdpath( host, plugin, plugin_instance, dtype, inst )
23 }
24 end
25
26 return opts
27 end