ram_without_repetition.conf 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. alarm: ram_available
  23. on: mem.available
  24. os: linux
  25. hosts: *
  26. calc: ($avail + $used_ram_to_ignore) * 100 / ($system.ram.used + $system.ram.cached + $system.ram.free + $system.ram.buffers)
  27. units: %
  28. every: 10s
  29. warn: $this < (($status >= $WARNING) ? (15) : (10))
  30. crit: $this < (($status == $CRITICAL) ? (10) : ( 5))
  31. delay: down 15m multiplier 1.5 max 1h
  32. info: estimated amount of RAM available for userspace processes, without causing swapping
  33. to: sysadmin #alarms
  34. ## FreeBSD
  35. alarm: ram_in_use
  36. on: system.ram
  37. os: freebsd
  38. hosts: *
  39. calc: ($active + $wired + $laundry + $buffers - $used_ram_to_ignore) * 100 / ($active + $wired + $laundry + $buffers - $used_ram_to_ignore + $cache + $free + $inactive)
  40. units: %
  41. every: 10s
  42. warn: $this > (($status >= $WARNING) ? (80) : (90))
  43. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  44. delay: down 15m multiplier 1.5 max 1h
  45. info: system RAM usage
  46. to: sysadmin #alarms
  47. alarm: ram_available
  48. on: system.ram
  49. os: freebsd
  50. hosts: *
  51. calc: ($free + $inactive + $used_ram_to_ignore) * 100 / ($free + $active + $inactive + $wired + $cache + $laundry + $buffers)
  52. units: %
  53. every: 10s
  54. warn: $this < (($status >= $WARNING) ? (15) : (10))
  55. crit: $this < (($status == $CRITICAL) ? (10) : ( 5))
  56. delay: down 15m multiplier 1.5 max 1h
  57. info: estimated amount of RAM available for userspace processes, without causing swapping
  58. to: sysadmin #alarms