* Cleanup
[project/luci.git] / applications / luci-statistics / src / model / cbi / admin_statistics / ping.lua
1 --[[
2
3 Luci configuration model for statistics - collectd ping plugin configuration
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$
13
14 ]]--
15
16 m = Map("luci_statistics", "Ping Plugin",
17 [[Das Ping-Plugin veranlasst periodische ICMP-Requests an die angegebenen Adressen und zeichnet
18 Parameter wie Verfügbarkeit und Antwortzeiten auf.]])
19
20 -- collectd_ping config section
21 s = m:section( NamedSection, "collectd_ping", "luci_statistics", "Pluginkonfiguration" )
22
23 -- collectd_ping.enable
24 enable = s:option( Flag, "enable", "Plugin aktivieren" )
25 enable.default = 0
26
27 -- collectd_ping.hosts (Host)
28 hosts = s:option( Value, "Hosts", "Zieladressen", "Einträge durch Leerzeichen trennen" )
29 hosts.default = "127.0.0.1"
30 hosts:depends( "enable", 1 )
31
32 -- collectd_ping.ttl (TTL)
33 ttl = s:option( Value, "TTL", "Time-to-Live für die ICMP-Pakete (Werte 0 bis 255)" )
34 ttl.isinteger = true
35 ttl.default = 128
36 ttl:depends( "enable", 1 )
37
38 return m