unixsock.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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("Unixsock Plugin Configuration"),
  5. translate(
  6. "The unixsock plugin creates a unix socket which can be used " ..
  7. "to read collected data from a running collectd instance."
  8. ))
  9. -- collectd_unixsock config section
  10. s = m:section( NamedSection, "collectd_unixsock", "luci_statistics" )
  11. -- collectd_unixsock.enable
  12. enable = s:option( Flag, "enable", translate("Enable this plugin") )
  13. enable.default = 0
  14. -- collectd_unixsock.socketfile (SocketFile)
  15. socketfile = s:option( Value, "SocketFile" )
  16. socketfile.default = "/var/run/collect-query.socket"
  17. socketfile:depends( "enable", 1 )
  18. -- collectd_unixsock.socketgroup (SocketGroup)
  19. socketgroup = s:option( Value, "SocketGroup" )
  20. socketgroup.default = "nobody"
  21. socketgroup.rmempty = true
  22. socketgroup.optional = true
  23. socketgroup:depends( "enable", 1 )
  24. -- collectd_unixsock.socketperms (SocketPerms)
  25. socketperms = s:option( Value, "SocketPerms" )
  26. socketperms.default = "0770"
  27. socketperms.rmempty = true
  28. socketperms.optional = true
  29. socketperms:depends( "enable", 1 )
  30. return m