Add monitoring server for newinfra
parent
9ee665828d
commit
e7b5f7e612
1
hosts
1
hosts
|
@ -79,6 +79,7 @@ belenios # on changera plus tard
|
|||
re2o-ldap.adm.crans.org
|
||||
gitlab-ci.adm.crans.org
|
||||
hodaur.adm.crans.org
|
||||
monitoring.adm.crans.org
|
||||
|
||||
[ovh_physical]
|
||||
sputnik.adm.crans.org
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Deploy Prometheus and Grafana on monitoring server
|
||||
- hosts: fyre.adm.crans.org
|
||||
- hosts: monitoring.adm.crans.org
|
||||
vars:
|
||||
# Prometheus targets.json
|
||||
prometheus:
|
||||
|
@ -72,11 +72,6 @@
|
|||
adm_ipv4: "{{ ansible_all_ipv4_addresses | ipaddr(adm_subnet) | first }}"
|
||||
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
|
||||
- hosts: redisdead.adm.crans.org
|
||||
roles: ["prometheus-node-exporter-postfix"]
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
- name: Restart smartd
|
||||
service:
|
||||
name: smartd
|
||||
state: restarted
|
|
@ -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
|
Loading…
Reference in New Issue