btrfs.conf 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. template: btrfs_allocated
  2. on: btrfs.disk
  3. class: Utilization
  4. type: System
  5. component: File system
  6. os: *
  7. hosts: *
  8. families: *
  9. calc: 100 - ($unallocated * 100 / ($unallocated + $data_used + $data_free + $meta_used + $meta_free + $sys_used + $sys_free))
  10. units: %
  11. every: 10s
  12. warn: $this > (($status >= $WARNING) ? (90) : (95))
  13. crit: $this > (($status == $CRITICAL) ? (95) : (98))
  14. delay: up 1m down 15m multiplier 1.5 max 1h
  15. info: percentage of allocated BTRFS physical disk space
  16. to: sysadmin
  17. template: btrfs_data
  18. on: btrfs.data
  19. class: Utilization
  20. type: System
  21. component: File system
  22. os: *
  23. hosts: *
  24. families: *
  25. calc: $used * 100 / ($used + $free)
  26. units: %
  27. every: 10s
  28. warn: $this > (($status >= $WARNING) ? (90) : (95)) && $btrfs_allocated > 98
  29. crit: $this > (($status == $CRITICAL) ? (95) : (98)) && $btrfs_allocated > 98
  30. delay: up 1m down 15m multiplier 1.5 max 1h
  31. info: utilization of BTRFS data space
  32. to: sysadmin
  33. template: btrfs_metadata
  34. on: btrfs.metadata
  35. class: Utilization
  36. type: System
  37. component: File system
  38. os: *
  39. hosts: *
  40. families: *
  41. calc: ($used + $reserved) * 100 / ($used + $free + $reserved)
  42. units: %
  43. every: 10s
  44. warn: $this > (($status >= $WARNING) ? (90) : (95)) && $btrfs_allocated > 98
  45. crit: $this > (($status == $CRITICAL) ? (95) : (98)) && $btrfs_allocated > 98
  46. delay: up 1m down 15m multiplier 1.5 max 1h
  47. info: utilization of BTRFS metadata space
  48. to: sysadmin
  49. template: btrfs_system
  50. on: btrfs.system
  51. class: Utilization
  52. type: System
  53. component: File system
  54. os: *
  55. hosts: *
  56. families: *
  57. calc: $used * 100 / ($used + $free)
  58. units: %
  59. every: 10s
  60. warn: $this > (($status >= $WARNING) ? (90) : (95)) && $btrfs_allocated > 98
  61. crit: $this > (($status == $CRITICAL) ? (95) : (98)) && $btrfs_allocated > 98
  62. delay: up 1m down 15m multiplier 1.5 max 1h
  63. info: utilization of BTRFS system space
  64. to: sysadmin
  65. template: btrfs_device_read_errors
  66. on: btrfs.device_errors
  67. class: Errors
  68. type: System
  69. component: File system
  70. os: *
  71. hosts: *
  72. families: *
  73. units: errors
  74. lookup: max -10m every 1m of read_errs
  75. warn: $this > 0
  76. delay: up 1m down 15m multiplier 1.5 max 1h
  77. info: number of encountered BTRFS read errors
  78. to: sysadmin
  79. template: btrfs_device_write_errors
  80. on: btrfs.device_errors
  81. class: Errors
  82. type: System
  83. component: File system
  84. os: *
  85. hosts: *
  86. families: *
  87. units: errors
  88. lookup: max -10m every 1m of write_errs
  89. warn: $this > 0
  90. delay: up 1m down 15m multiplier 1.5 max 1h
  91. info: number of encountered BTRFS write errors
  92. to: sysadmin
  93. template: btrfs_device_flush_errors
  94. on: btrfs.device_errors
  95. class: Errors
  96. type: System
  97. component: File system
  98. os: *
  99. hosts: *
  100. families: *
  101. units: errors
  102. lookup: max -10m every 1m of flush_errs
  103. warn: $this > 0
  104. delay: up 1m down 15m multiplier 1.5 max 1h
  105. info: number of encountered BTRFS flush errors
  106. to: sysadmin
  107. template: btrfs_device_corruption_errors
  108. on: btrfs.device_errors
  109. class: Errors
  110. type: System
  111. component: File system
  112. os: *
  113. hosts: *
  114. families: *
  115. units: errors
  116. lookup: max -10m every 1m of corruption_errs
  117. warn: $this > 0
  118. delay: up 1m down 15m multiplier 1.5 max 1h
  119. info: number of encountered BTRFS corruption errors
  120. to: sysadmin
  121. template: btrfs_device_generation_errors
  122. on: btrfs.device_errors
  123. class: Errors
  124. type: System
  125. component: File system
  126. os: *
  127. hosts: *
  128. families: *
  129. units: errors
  130. lookup: max -10m every 1m of generation_errs
  131. warn: $this > 0
  132. delay: up 1m down 15m multiplier 1.5 max 1h
  133. info: number of encountered BTRFS generation errors
  134. to: sysadmin