Share Pastebin
Guest
Public paste!

meister

By: a guest | Jan 28th, 2010 | Syntax: None | Size: 0.55 KB | Hits: 72 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. # manifests/nodes.pp
  2. $disks = [[ "/dev/md0", "md0", "98%" ]]
  3. -------------
  4.  
  5. # modules/monit/templates/disk_space.conf.erb
  6. <% for disk in disks %>
  7.     check device "<%= disk[1] %>" with path "<%= disk[0] %>"
  8.     if space usage > <%= disk[2] %>% then alert
  9. <% end %>
  10. --------------
  11.  
  12. # /etc/monit.d/disk_space.conf
  13.  
  14.     check device "100" with path "47"
  15.     if space usage > 101% then alert
  16.  
  17.     check device "100" with path "109"
  18.     if space usage > 48% then alert
  19.  
  20.     check device "56" with path "57"
  21.     if space usage > 37% then alert