disks.conf 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. # you can disable an alarm notification by setting the 'to' line to: silent
  2. # -----------------------------------------------------------------------------
  3. # low disk space
  4. # checking the latest collected values
  5. # raise an alarm if the disk is low on
  6. # available disk space
  7. template: disk_space_usage
  8. on: disk.space
  9. class: Utilization
  10. type: System
  11. component: Disk
  12. os: linux freebsd
  13. hosts: *
  14. families: !/dev !/dev/* !/run !/run/* *
  15. calc: $used * 100 / ($avail + $used)
  16. units: %
  17. every: 1m
  18. warn: $this > (($status >= $WARNING ) ? (80) : (90))
  19. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  20. delay: up 1m down 15m multiplier 1.5 max 1h
  21. info: disk $family space utilization
  22. to: sysadmin
  23. template: disk_inode_usage
  24. on: disk.inodes
  25. class: Utilization
  26. type: System
  27. component: Disk
  28. os: linux freebsd
  29. hosts: *
  30. families: !/dev !/dev/* !/run !/run/* *
  31. calc: $used * 100 / ($avail + $used)
  32. units: %
  33. every: 1m
  34. warn: $this > (($status >= $WARNING) ? (80) : (90))
  35. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  36. delay: up 1m down 15m multiplier 1.5 max 1h
  37. info: disk $family inode utilization
  38. to: sysadmin
  39. # -----------------------------------------------------------------------------
  40. # disk fill rate
  41. # calculate the rate the disk fills
  42. # use as base, the available space change
  43. # during the last hour
  44. # this is just a calculation - it has no alarm
  45. # we will use it in the next template to find
  46. # the hours remaining
  47. # template: disk_fill_rate
  48. # on: disk.space
  49. # os: linux freebsd
  50. # hosts: *
  51. # families: *
  52. # lookup: min -10m at -50m unaligned of avail
  53. # calc: ($this - $avail) / (($now - $after) / 3600)
  54. # every: 1m
  55. # units: GB/hour
  56. # info: average rate the disk fills up (positive), or frees up (negative) space, for the last hour
  57. # calculate the hours remaining
  58. # if the disk continues to fill
  59. # in this rate
  60. # template: out_of_disk_space_time
  61. # on: disk.space
  62. # os: linux freebsd
  63. # hosts: *
  64. # families: *
  65. # calc: ($disk_fill_rate > 0) ? ($avail / $disk_fill_rate) : (inf)
  66. # units: hours
  67. # every: 10s
  68. # warn: $this > 0 and $this < (($status >= $WARNING) ? (48) : (8))
  69. # crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
  70. # delay: down 15m multiplier 1.2 max 1h
  71. # info: estimated time the disk will run out of space, if the system continues to add data with the rate of the last hour
  72. # to: sysadmin
  73. # -----------------------------------------------------------------------------
  74. # disk inode fill rate
  75. # calculate the rate the disk inodes are allocated
  76. # use as base, the available inodes change
  77. # during the last hour
  78. # this is just a calculation - it has no alarm
  79. # we will use it in the next template to find
  80. # the hours remaining
  81. # template: disk_inode_rate
  82. # on: disk.inodes
  83. # os: linux freebsd
  84. # hosts: *
  85. # families: *
  86. # lookup: min -10m at -50m unaligned of avail
  87. # calc: ($this - $avail) / (($now - $after) / 3600)
  88. # every: 1m
  89. # units: inodes/hour
  90. # info: average rate at which disk inodes are allocated (positive), or freed (negative), for the last hour
  91. # calculate the hours remaining
  92. # if the disk inodes are allocated
  93. # in this rate
  94. # template: out_of_disk_inodes_time
  95. # on: disk.inodes
  96. # os: linux freebsd
  97. # hosts: *
  98. # families: *
  99. # calc: ($disk_inode_rate > 0) ? ($avail / $disk_inode_rate) : (inf)
  100. # units: hours
  101. # every: 10s
  102. # warn: $this > 0 and $this < (($status >= $WARNING) ? (48) : (8))
  103. # crit: $this > 0 and $this < (($status == $CRITICAL) ? (24) : (2))
  104. # delay: down 15m multiplier 1.2 max 1h
  105. # info: estimated time the disk will run out of inodes, if the system continues to allocate inodes with the rate of the last hour
  106. # to: sysadmin
  107. # -----------------------------------------------------------------------------
  108. # disk congestion
  109. # raise an alarm if the disk is congested
  110. # by calculating the average disk utilization
  111. # for the last 10 minutes
  112. template: 10min_disk_utilization
  113. on: disk.util
  114. class: Utilization
  115. type: System
  116. component: Disk
  117. os: linux freebsd
  118. hosts: *
  119. families: *
  120. lookup: average -10m unaligned
  121. units: %
  122. every: 1m
  123. warn: $this > 98 * (($status >= $WARNING) ? (0.7) : (1))
  124. delay: down 15m multiplier 1.2 max 1h
  125. info: average percentage of time $family disk was busy over the last 10 minutes
  126. to: silent
  127. # raise an alarm if the disk backlog
  128. # is above 1000ms (1s) per second
  129. # for 10 minutes
  130. # (i.e. the disk cannot catch up)
  131. template: 10min_disk_backlog
  132. on: disk.backlog
  133. class: Latency
  134. type: System
  135. component: Disk
  136. os: linux
  137. hosts: *
  138. families: *
  139. lookup: average -10m unaligned
  140. units: ms
  141. every: 1m
  142. warn: $this > 5000 * (($status >= $WARNING) ? (0.7) : (1))
  143. delay: down 15m multiplier 1.2 max 1h
  144. info: average backlog size of the $family disk over the last 10 minutes
  145. to: silent