monit_services:
  - name: blog.entwicklerbier.org
    type: system
    rules:
      - "if memory usage > 90% for 3 cycles then alert"
      - "if swap usage > 70% for 3 cycles then alert"
      - "if cpu usage (user)   > 70% then alert"
      - "if cpu usage (system) > 30% then alert"
      - "if cpu usage (wait)   > 20% then alert"
  - name: /
    target: "{{ ansible_mounts[0].device }}"
    type: filesystem
    rules:
      - "if space usage > 80% for 8 cycles then alert"

monit_services:
  - name: blog.entwicklerbier.org
    type: system
    rules:
      - "if memory usage > 90% for 3 cycles then alert"
      - "if swap usage > 70% for 3 cycles then alert"
      - "if cpu usage (user)   > 70% then alert"
      - "if cpu usage (system) > 30% then alert"
      - "if cpu usage (wait)   > 20% then alert"
  - name: /
    target: "{{ ansible_mounts[0].device }}"
    type: filesystem
    rules:
      - "if space usage > 80% for 8 cycles then alert"

  - name: ejabberd
    type: process
    target: /var/run/ejabberd/ejabberd.pid
    start: "/etc/init.d/ejabberd start"
    stop: "/etc/init.d/ejabberd stop"
    rules:
    -  "if totalcpu > 80% for 3 cycles then alert"
    -  "if totalcpu > 80% for 6 cycles then restart"

Monitor jabber service on second host
Monitor jabber service on second host
