swap.conf 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. summary: System memory swapped out
  17. info: Percentage of the system RAM swapped in the last 30 minutes
  18. to: silent
  19. alarm: used_swap
  20. on: mem.swap
  21. class: Utilization
  22. type: System
  23. component: Memory
  24. os: linux freebsd
  25. hosts: *
  26. calc: (($used + $free) > 0) ? ($used * 100 / ($used + $free)) : 0
  27. units: %
  28. every: 10s
  29. warn: $this > (($status >= $WARNING) ? (80) : (90))
  30. crit: $this > (($status == $CRITICAL) ? (90) : (98))
  31. delay: up 30s down 15m multiplier 1.5 max 1h
  32. summary: System swap memory utilization
  33. info: Swap memory utilization
  34. to: sysadmin