add some indirection around make targets of module.mk, so you can combine it more...
[project/luci.git] / applications / luci-statistics / src / 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