swap.conf 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # you can disable an alarm notification by setting the 'to' line to: silent
  2. alarm: 30min_ram_swapped_out
  3. on: mem.swapio
  4. class: Workload
  5. type: System
  6. component: Memory
  7. os: linux freebsd
  8. hosts: *
  9. lookup: sum -30m unaligned absolute of out
  10. # we have to convert KB to MB by dividing $this (i.e. the result of the lookup) with 1024
  11. calc: $this / 1024 * 100 / ( $system.ram.used + $system.ram.cached + $system.ram.free )
  12. units: % of RAM
  13. every: 1m
  14. warn: $this > (($status >= $WARNING) ? (20) : (30))
  15. delay: down 15m multiplier 1.5 max 1h
  16. info: percentage of the system RAM swapped in the last 30 minutes
  17. to: silent
  18. alarm: used_swap
  19. on: mem.swap
  20. class: Utilization
  21. type: System
  22. component: Memory
  23. os: linux freebsd
  24. hosts: *
  25. calc: (($used + $free) > 0) ? ($used * 100 / ($used + $free)) : 0
  26. units: %
  27. every: 10s
  28. warn: $this > (($status >= $WARNING) ? (80) : (90))
  29. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  30. delay: up 30s down 15m multiplier 1.5 max 1h
  31. info: swap memory utilization
  32. to: sysadmin