Monitor HP SmartArray

certbot_on_virtu
Alexandre Iooss 2019-12-13 15:19:18 +01:00
parent 38693b5112
commit 12bba889a3
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
3 changed files with 33 additions and 0 deletions

View File

@ -35,6 +35,12 @@
roles: roles:
- prometheus-apache-exporter - prometheus-apache-exporter
# Configure HP RAID monitoring
# You can list SCSI drives with `lsscsi -g`
- hosts: fyre.adm.crans.org
roles:
- smartd-hp-smartarray
# Deploy grafana # Deploy grafana
- hosts: fyre.adm.crans.org - hosts: fyre.adm.crans.org
vars: vars:

View File

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

View File

@ -0,0 +1,22 @@
- 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: yes
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