df.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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("DF Plugin Configuration"),
  5. translate(
  6. "The df plugin collects statistics about the disk space " ..
  7. "usage on different devices, mount points or filesystem types."
  8. ))
  9. -- collectd_df config section
  10. s = m:section( NamedSection, "collectd_df", "luci_statistics" )
  11. -- collectd_df.enable
  12. enable = s:option( Flag, "enable", translate("Enable this plugin") )
  13. enable.default = 0
  14. -- collectd_df.devices (Device)
  15. devices = s:option( Value, "Devices", translate("Monitor devices") )
  16. devices.default = "/dev/mtdblock/4"
  17. devices.optional = true
  18. devices:depends( "enable", 1 )
  19. -- collectd_df.mountpoints (MountPoint)
  20. mountpoints = s:option( Value, "MountPoints", translate("Monitor mount points") )
  21. mountpoints.default = "/overlay"
  22. mountpoints.optional = true
  23. mountpoints:depends( "enable", 1 )
  24. -- collectd_df.fstypes (FSType)
  25. fstypes = s:option( Value, "FSTypes", translate("Monitor filesystem types") )
  26. fstypes.default = "tmpfs"
  27. fstypes.optional = true
  28. fstypes:depends( "enable", 1 )
  29. -- collectd_df.ignoreselected (IgnoreSelected)
  30. ignoreselected = s:option( Flag, "IgnoreSelected", translate("Monitor all except specified") )
  31. ignoreselected.default = 0
  32. ignoreselected:depends( "enable", 1 )
  33. return m