1
0

ping.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
  2. -- Licensed to the public under the Apache License 2.0.
  3. m = Map("luci_statistics",
  4. translate("Ping Plugin Configuration"),
  5. translate(
  6. "The ping plugin will send icmp echo replies to selected " ..
  7. "hosts and measure the roundtrip time for each host."
  8. ))
  9. -- collectd_ping config section
  10. s = m:section( NamedSection, "collectd_ping", "luci_statistics" )
  11. -- collectd_ping.enable
  12. enable = s:option( Flag, "enable", translate("Enable this plugin") )
  13. enable.default = 0
  14. -- collectd_ping.hosts (Host)
  15. hosts = s:option( Value, "Hosts", translate("Monitor hosts"), translate ("Add multiple hosts separated by space."))
  16. hosts.default = "127.0.0.1"
  17. hosts:depends( "enable", 1 )
  18. -- collectd_ping.ttl (TTL)
  19. ttl = s:option( Value, "TTL", translate("TTL for ping packets") )
  20. ttl.isinteger = true
  21. ttl.default = 128
  22. ttl:depends( "enable", 1 )
  23. -- collectd_ping.interval (Interval)
  24. interval = s:option( Value, "Interval", translate("Interval for pings"), translate ("Seconds") )
  25. interval.isinteger = true
  26. interval.default = 30
  27. interval:depends( "enable", 1 )
  28. return m