Thomas Buck преди 5 години
родител
ревизия
11e0282841

+ 0
- 1
README.md Целия файл

@@ -29,7 +29,6 @@ What do you get if you point Sovereign at a server? All kinds of good stuff!
29 29
 -   Your own VPN server via [OpenVPN](http://openvpn.net/index.php/open-source.html).
30 30
 -   An IRC bouncer via [ZNC](http://wiki.znc.in/ZNC).
31 31
 -   [Monit](http://mmonit.com/monit/) to keep everything running smoothly (and alert you when it’s not).
32
--   [collectd](http://collectd.org/) to collect system statistics.
33 32
 -   Web hosting (ex: for your blog) via [Apache](https://www.apache.org/).
34 33
 -   Statistics for the website using [Fathom](https://github.com/usefathom/fathom).
35 34
 -   Firewall management via [Uncomplicated Firewall (ufw)](https://wiki.ubuntu.com/UncomplicatedFirewall).

+ 0
- 4
roles/monitoring/defaults/main.yml Целия файл

@@ -1,4 +0,0 @@
1
-collectd_version: 5.4.1
2
-collectd_librato_version: 0.0.10
3
-collectd_librato_email: "" # (optional)
4
-collectd_librato_api_token: "" # (optional)

+ 2
- 2
roles/monitoring/handlers/main.yml Целия файл

@@ -1,8 +1,8 @@
1 1
 - name: restart monit
2 2
   service: name=monit state=restarted
3 3
 
4
-- name: restart collectd
5
-  service: name=collectd state=restarted
4
+- name: restart apache
5
+  service: name=apache2 state=restarted
6 6
 
7 7
 - name: restart rspamd
8 8
   service: name=rspamd state=restarted

+ 0
- 16
roles/monitoring/tasks/collectd.yml Целия файл

@@ -1,16 +0,0 @@
1
-- name: Install collectd
2
-  apt: pkg=collectd state=present
3
-  tags:
4
-      - dependencies
5
-
6
-- name: Copy collectd configuration file into place
7
-  template: src=etc_collectd_collectd.conf.j2 dest=/etc/collectd/collectd.conf
8
-  notify: restart collectd
9
-
10
-- name: Ensure collectd is started
11
-  service: name=collectd state=started
12
-
13
-# Work around https://github.com/ansible/ansible-modules-core/issues/915
14
-# otherwise we'd use enabled=yes in previous task
15
-- name: Ensure collectd is enabled
16
-  command: update-rc.d collectd enable creates=/etc/rc3.d/S03collectd

+ 0
- 1
roles/monitoring/tasks/main.yml Целия файл

@@ -1,3 +1,2 @@
1 1
 - include: monit.yml tags=monit
2 2
 - include: logwatch.yml tags=logwatch
3
-- include: collectd.yml tags=collectd

+ 0
- 29
roles/monitoring/templates/etc_collectd_collectd.conf.j2 Целия файл

@@ -1,29 +0,0 @@
1
-BaseDir "/etc/collectd"
2
-
3
-LoadPlugin syslog
4
-LoadPlugin cpu
5
-LoadPlugin interface
6
-LoadPlugin load
7
-LoadPlugin memory
8
-LoadPlugin disk
9
-LoadPlugin df
10
-LoadPlugin rrdtool
11
-
12
-<Plugin rrdtool>
13
-  DataDir "/opt/collectd/var/lib/collectd/rrd"
14
-</Plugin>
15
-
16
-{% if (collectd_librato_email|length and collectd_librato_api_token|length) %}
17
-<LoadPlugin python>
18
-  Globals true
19
-</LoadPlugin>
20
-
21
-<Plugin write_http>
22
-  <URL "https://collectd.librato.com/v1/measurements">
23
-    User "{{ collectd_librato_email }}"
24
-    Password "{{ collectd_librato_api_token }}"
25
-    Format "JSON"
26
-  </URL>
27
-</Plugin>
28
-{% endif %}
29
-

Loading…
Отказ
Запис