ram.conf 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # you can disable an alarm notification by setting the 'to' line to: silent
  2. alarm: used_ram_to_ignore
  3. on: system.ram
  4. class: Utilization
  5. type: System
  6. component: Memory
  7. os: linux freebsd
  8. hosts: *
  9. calc: ($zfs.arc_size.arcsz = nan)?(0):($zfs.arc_size.arcsz - $zfs.arc_size.min)
  10. every: 10s
  11. info: amount of memory reported as used, \
  12. but it is actually capable for resizing itself based on the system needs (eg. ZFS ARC)
  13. alarm: ram_in_use
  14. on: system.ram
  15. class: Utilization
  16. type: System
  17. component: Memory
  18. os: linux
  19. hosts: *
  20. calc: ($used - $used_ram_to_ignore) * 100 / ($used + $cached + $free + $buffers)
  21. units: %
  22. every: 10s
  23. warn: $this > (($status >= $WARNING) ? (80) : (90))
  24. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  25. delay: down 15m multiplier 1.5 max 1h
  26. info: system memory utilization
  27. to: sysadmin
  28. alarm: ram_available
  29. on: mem.available
  30. class: Utilization
  31. type: System
  32. component: Memory
  33. os: linux
  34. hosts: *
  35. calc: $avail * 100 / ($system.ram.used + $system.ram.cached + $system.ram.free + $system.ram.buffers)
  36. units: %
  37. every: 10s
  38. warn: $this < (($status >= $WARNING) ? (15) : (10))
  39. crit: $this < (($status == $CRITICAL) ? (10) : ( 5))
  40. delay: down 15m multiplier 1.5 max 1h
  41. info: percentage of estimated amount of RAM available for userspace processes, without causing swapping
  42. to: sysadmin
  43. alarm: oom_kill
  44. on: mem.oom_kill
  45. os: linux
  46. hosts: *
  47. lookup: sum -30m unaligned
  48. units: kills
  49. every: 5m
  50. warn: $this > 0
  51. delay: down 10m
  52. host labels: _is_k8s_node = false
  53. info: number of out of memory kills in the last 30 minutes
  54. to: sysadmin
  55. ## FreeBSD
  56. alarm: ram_in_use
  57. on: system.ram
  58. class: Utilization
  59. type: System
  60. component: Memory
  61. os: freebsd
  62. hosts: *
  63. calc: ($active + $wired + $laundry + $buffers - $used_ram_to_ignore) * 100 / ($active + $wired + $laundry + $buffers - $used_ram_to_ignore + $cache + $free + $inactive)
  64. units: %
  65. every: 10s
  66. warn: $this > (($status >= $WARNING) ? (80) : (90))
  67. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  68. delay: down 15m multiplier 1.5 max 1h
  69. info: system memory utilization
  70. to: sysadmin
  71. alarm: ram_available
  72. on: system.ram
  73. class: Utilization
  74. type: System
  75. component: Memory
  76. os: freebsd
  77. hosts: *
  78. calc: ($free + $inactive + $used_ram_to_ignore) * 100 / ($free + $active + $inactive + $wired + $cache + $laundry + $buffers)
  79. units: %
  80. every: 10s
  81. warn: $this < (($status >= $WARNING) ? (15) : (10))
  82. crit: $this < (($status == $CRITICAL) ? (10) : ( 5))
  83. delay: down 15m multiplier 1.5 max 1h
  84. info: percentage of estimated amount of RAM available for userspace processes, without causing swapping
  85. to: sysadmin