ram_with_repetition.conf 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. os: linux freebsd
  5. hosts: *
  6. calc: ($zfs.arc_size.arcsz = nan)?(0):($zfs.arc_size.arcsz)
  7. every: 10s
  8. info: the amount of memory that is reported as used, but it is actually capable for resizing itself based on the system needs (eg. ZFS ARC)
  9. alarm: ram_in_use
  10. on: system.ram
  11. os: linux
  12. hosts: *
  13. # calc: $used * 100 / ($used + $cached + $free)
  14. calc: ($used - $used_ram_to_ignore) * 100 / ($used - $used_ram_to_ignore + $cached + $free)
  15. units: %
  16. every: 1s
  17. warn: $this > 1
  18. crit: $this > 5
  19. delay: down 15m multiplier 1.5 max 1h
  20. info: system RAM used
  21. to: sysadmin #alarms
  22. repeat: warning 30s critical 60s
  23. alarm: ram_available
  24. on: mem.available
  25. os: linux
  26. hosts: *
  27. calc: ($avail + $used_ram_to_ignore) * 100 / ($system.ram.used + $system.ram.cached + $system.ram.free + $system.ram.buffers)
  28. units: %
  29. every: 10s
  30. warn: $this < (($status >= $WARNING) ? (15) : (10))
  31. crit: $this < (($status == $CRITICAL) ? (10) : ( 5))
  32. delay: down 15m multiplier 1.5 max 1h
  33. info: estimated amount of RAM available for userspace processes, without causing swapping
  34. to: sysadmin #alarms
  35. ## FreeBSD
  36. alarm: ram_in_use
  37. on: system.ram
  38. os: freebsd
  39. hosts: *
  40. calc: ($active + $wired + $laundry + $buffers - $used_ram_to_ignore) * 100 / ($active + $wired + $laundry + $buffers - $used_ram_to_ignore + $cache + $free + $inactive)
  41. units: %
  42. every: 10s
  43. warn: $this > (($status >= $WARNING) ? (80) : (90))
  44. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  45. delay: down 15m multiplier 1.5 max 1h
  46. info: system RAM usage
  47. to: sysadmin #alarms
  48. alarm: ram_available
  49. on: system.ram
  50. os: freebsd
  51. hosts: *
  52. calc: ($free + $inactive + $used_ram_to_ignore) * 100 / ($free + $active + $inactive + $wired + $cache + $laundry + $buffers)
  53. units: %
  54. every: 10s
  55. warn: $this < (($status >= $WARNING) ? (15) : (10))
  56. crit: $this < (($status == $CRITICAL) ? (10) : ( 5))
  57. delay: down 15m multiplier 1.5 max 1h
  58. info: estimated amount of RAM available for userspace processes, without causing swapping
  59. to: sysadmin #alarms