Add monitoring server for newinfra

certbot_on_virtu
Alexandre Iooss 2020-08-19 13:47:29 +02:00
parent 9ee665828d
commit e7b5f7e612
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
4 changed files with 2 additions and 34 deletions

1
hosts
View File

@ -79,6 +79,7 @@ belenios # on changera plus tard
re2o-ldap.adm.crans.org re2o-ldap.adm.crans.org
gitlab-ci.adm.crans.org gitlab-ci.adm.crans.org
hodaur.adm.crans.org hodaur.adm.crans.org
monitoring.adm.crans.org
[ovh_physical] [ovh_physical]
sputnik.adm.crans.org sputnik.adm.crans.org

View File

@ -1,7 +1,7 @@
#!/usr/bin/env ansible-playbook #!/usr/bin/env ansible-playbook
--- ---
# Deploy Prometheus and Grafana on monitoring server # Deploy Prometheus and Grafana on monitoring server
- hosts: fyre.adm.crans.org - hosts: monitoring.adm.crans.org
vars: vars:
# Prometheus targets.json # Prometheus targets.json
prometheus: prometheus:
@ -72,11 +72,6 @@
adm_ipv4: "{{ ansible_all_ipv4_addresses | ipaddr(adm_subnet) | first }}" adm_ipv4: "{{ ansible_all_ipv4_addresses | ipaddr(adm_subnet) | first }}"
roles: ["prometheus-apache-exporter"] roles: ["prometheus-apache-exporter"]
# Configure HP RAID monitoring
# You can list SCSI drives with `lsscsi -g`
- hosts: fyre.adm.crans.org,gateau.adm.crans.org
roles: ["smartd-hp-smartarray"]
# Monitor mailq with a special text exporter # Monitor mailq with a special text exporter
- hosts: redisdead.adm.crans.org - hosts: redisdead.adm.crans.org
roles: ["prometheus-node-exporter-postfix"] roles: ["prometheus-node-exporter-postfix"]

View File

@ -1,5 +0,0 @@
---
- name: Restart smartd
service:
name: smartd
state: restarted

View File

@ -1,23 +0,0 @@
---
- name: Install smartd
apt:
update_cache: true
name: smartmontools
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Disable smartd autodiscovery
lineinfile:
path: /etc/smartd.conf
regexp: '(?i)^(DEVICESCAN.*)'
line: '#\1'
backrefs: true
notify: Restart smartd
- name: Monitor local HP SmartArray
lineinfile:
path: /etc/smartd.conf
regexp: '^/dev/sg0'
line: /dev/sg0 -a -d cciss,0 -m root
notify: Restart smartd