Monitor HP SmartArray
parent
38693b5112
commit
12bba889a3
|
@ -35,6 +35,12 @@
|
|||
roles:
|
||||
- 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
|
||||
- hosts: fyre.adm.crans.org
|
||||
vars:
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Restart smartd
|
||||
service:
|
||||
name: smartd
|
||||
state: restarted
|
|
@ -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
|
Loading…
Reference in New Issue