Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pgolm/ansible-role-monit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f9b621b18693400bd5ac3a8788be3a37a38e7a56
Choose a base ref
..
head repository: pgolm/ansible-role-monit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0932beafd831e7ed62770f9a96948d033561796b
Choose a head ref
Showing with 3 additions and 15 deletions.
  1. +2 −4 README.md
  2. +0 −10 defaults/main.yml
  3. +1 −1 tasks/monitors.yml
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -54,10 +54,6 @@ Role Variables
* `monit_webinterface_rw_group`: Define group of users allowed to read and write on web interface. It is only applied when defined and is empty by default.
* `monit_webinterface_r_group`: Define group of users allowed to read on web interface. It is only applied when defined and is empty by default.
* `monit_webinterface_acl_rules`: List of ACL rules for the web interface, such as "localhost" or "hauk:password". It is only applied when defined and is empty by default. You should probably define at least one for the httpd service to start.
* `monit_apache_rules`: List of monitoring rules for apache service. You should adjust them to your needs.
* `monit_apache_groups`: List of groups for the apache service. This list is empty by default.
* `monit_memcached_rules`: List of monitoring rules for memcached service. You should adjust them to your needs.
* `monit_memcached_groups`: List of groups for the memcached service. This list is empty by default.

Custom facts
------------
@@ -79,10 +75,12 @@ CONTRIBUTORS
* [Anthony Dmitriyev](https://github.com/antstorm)
* [byteshiva](http://byteshiva.github.io/)
* [Eduardo de Vera Toquero](https://github.com/etux)
* [Jordi Clariana](https://github.com/jordiclariana)
* [Manuel Tiago Pereira](http://mtpereira.github.io/)
* [Markus Klepp](https://github.com/kh0r)
* [Panagiotis Moustafellos](https://github.com/pmoust)
* [Peter Golm](https://github.com/pgolm)
* [Romain Gonord](https://github.com/astik)
* [Roozbeh Farahbod](https://github.com/roozbehf)
* [Svend Vanderveken](https://github.com/svendx4f)
* [Tom Naessens](https://github.com/Silox)
10 changes: 0 additions & 10 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -14,13 +14,3 @@ monit_mailserver_port: 25
monit_webinterface_enabled: true
monit_webinterface_bind: 0.0.0.0
monit_webinterface_port: 2812

monit_apache_rules:
- "if totalcpu > 80% for 3 cycles then alert"
- "if totalmem > 400.0 MB for 5 cycles then alert"
- "if children > 250 then alert"
- "if loadavg(5min) > 20 for 8 cycles then alert"

monit_memcached_rules:
- "if failed host 127.0.0.1 port 11211 protocol MEMCACHE then restart"
- "if cpu > 80% for 3 cycles then alert"
2 changes: 1 addition & 1 deletion tasks/monitors.yml
Original file line number Diff line number Diff line change
@@ -35,6 +35,6 @@
file:
path: "{{ monit_includes }}/{{ item }}"
state: absent
with_items: "{{ monit_services_present.stdout_lines }}"
with_items: "{{ monit_services_present.stdout_lines | default([]) }}"
when: monit_service_delete_unlisted and item|basename not in ansible_local.monit.monit_configured_services
notify: restart monit