X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-statistics%2Fluasrc%2Fmodel%2Fcbi%2Fluci_statistics%2Fping.lua;fp=applications%2Fluci-app-statistics%2Fluasrc%2Fmodel%2Fcbi%2Fluci_statistics%2Fping.lua;h=c55ac87368900c65f31d391492a9a69c8e645da1;hp=0000000000000000000000000000000000000000;hb=1bb4822dca6113f73e3bc89e2acf15935e6f8e92;hpb=9edd0e46c3f880727738ce8ca6ff1c8b85f99ef4 diff --git a/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua new file mode 100644 index 000000000..c55ac8736 --- /dev/null +++ b/applications/luci-app-statistics/luasrc/model/cbi/luci_statistics/ping.lua @@ -0,0 +1,47 @@ +--[[ + +Luci configuration model for statistics - collectd ping plugin configuration +(c) 2008 Freifunk Leipzig / Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +]]-- + +m = Map("luci_statistics", + translate("Ping Plugin Configuration"), + translate( + "The ping plugin will send icmp echo replies to selected " .. + "hosts and measure the roundtrip time for each host." + )) + +-- collectd_ping config section +s = m:section( NamedSection, "collectd_ping", "luci_statistics" ) + +-- collectd_ping.enable +enable = s:option( Flag, "enable", translate("Enable this plugin") ) +enable.default = 0 + +-- collectd_ping.hosts (Host) +hosts = s:option( Value, "Hosts", translate("Monitor hosts"), translate ("Add multiple hosts separated by space.")) +hosts.default = "127.0.0.1" +hosts:depends( "enable", 1 ) + +-- collectd_ping.ttl (TTL) +ttl = s:option( Value, "TTL", translate("TTL for ping packets") ) +ttl.isinteger = true +ttl.default = 128 +ttl:depends( "enable", 1 ) + +-- collectd_ping.interval (Interval) +interval = s:option( Value, "Interval", translate("Interval for pings"), translate ("Seconds") ) +interval.isinteger = true +interval.default = 30 +interval:depends( "enable", 1 ) + +return m