Skip to content
Snippets Groups Projects
Verified Commit e7b5f7e6 authored by me5na7qbjqbrp's avatar me5na7qbjqbrp
Browse files

Add monitoring server for newinfra

parent 9ee66582
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
#!/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"]
......
---
- name: Restart smartd
service:
name: smartd
state: restarted
---
- 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment