apcups.lua 866 B

12345678910111213141516171819202122232425262728
  1. -- Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
  2. -- Licensed to the public under the Apache License 2.0.
  3. m = Map("luci_statistics",
  4. translate("APCUPS Plugin Configuration"),
  5. translate(
  6. "The APCUPS plugin collects statistics about the APC UPS."
  7. ))
  8. -- collectd_apcups config section
  9. s = m:section( NamedSection, "collectd_apcups", "luci_statistics" )
  10. -- collectd_apcups.enable
  11. enable = s:option( Flag, "enable", translate("Enable this plugin") )
  12. enable.default = 0
  13. -- collectd_apcups.host (Host)
  14. host = s:option( Value, "Host", translate("Monitor host"), translate ("Add multiple hosts separated by space."))
  15. host.default = "localhost"
  16. host:depends( "enable", 1 )
  17. -- collectd_apcups.port (Port)
  18. port = s:option( Value, "Port", translate("Port for apcupsd communication") )
  19. port.isinteger = true
  20. port.default = 3551
  21. port:depends( "enable", 1 )
  22. return m