applications/luci-statistics: move all models to the per-plugin level, provide titles...
[project/luci.git] / applications / luci-statistics / luasrc / statistics / rrdtool / definitions / tcpconns.lua
1 --[[
2
3 Luci statistics - tcpconns plugin diagram definition
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id: tcp_connections.lua 2274 2008-06-03 23:15:16Z jow $
13
14 ]]--
15
16 module("luci.statistics.rrdtool.definitions.tcpconns", package.seeall)
17
18 function rrdargs( graph, plugin, plugin_instance, dtype )
19 return {
20 title = "%H: TCP connections to port %pi",
21 vlabel = "Connections/s",
22 number_format = "%5.0lf",
23 data = {
24 types = { "tcp_connections" },
25 instances = {
26 tcp_connections = {
27 "SYN_SENT", "SYN_RECV", "LISTEN", "ESTABLISHED",
28 "LAST_ACK", "TIME_WAIT", "CLOSING", "CLOSE_WAIT",
29 "CLOSED", "FIN_WAIT1", "FIN_WAIT2"
30 },
31 options = { for k, v in (tcp_connections) do
32 v = { title = "%di", noarea = true }
33 end
34 }
35 }
36 }
37 }
38 end