Puppet Class: raid::hpsa::hpssacli
- Defined in:
- modules/raid/manifests/hpsa/hpssacli.pp
Overview
SPDX-License-Identifier: Apache-2.0 HP Raid controller
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'modules/raid/manifests/hpsa/hpssacli.pp', line 3
class raid::hpsa::hpssacli {
assert_private()
nrpe::plugin { 'check_hpssacli':
source => 'puppet:///modules/raid/dsa-check-hpssacli',
}
sudo::user { 'nagios_hpssacli':
user => 'nagios',
privileges => [
'ALL = NOPASSWD: /usr/sbin/hpssacli controller all show',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller all show detail',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller slot=[0-9] ld all show',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller slot=[0-9] ld all show detail',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller slot=[0-9] ld * show',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller slot=[0-9] pd all show',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller slot=[0-9] pd all show detail',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller slot=[0-9] pd [0-9]\:[0-9] show',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller slot=[0-9] pd [0-9][EIC]\:[0-9]\:[0-9] show',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller slot=[0-9] pd [0-9][EIC]\:[0-9]\:[0-9][0-9] show',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller slot=[0-9] show status',
'ALL = NOPASSWD: /usr/sbin/hpssacli controller slot=[0-9] show detail',
'ALL = NOPASSWD: /usr/sbin/hpacucli controller all show',
'ALL = NOPASSWD: /usr/sbin/hpacucli controller slot=[0-9] ld all show',
'ALL = NOPASSWD: /usr/sbin/hpacucli controller slot=[0-9] ld * show',
'ALL = NOPASSWD: /usr/sbin/hpacucli controller slot=[0-9] pd all show',
'ALL = NOPASSWD: /usr/sbin/hpacucli controller slot=[0-9] pd [0-9]\:[0-9] show',
'ALL = NOPASSWD: /usr/sbin/hpacucli controller slot=[0-9] pd [0-9][EIC]\:[0-9]\:[0-9] show',
'ALL = NOPASSWD: /usr/sbin/hpacucli controller slot=[0-9] pd [0-9][EIC]\:[0-9]\:[0-9][0-9] show',
'ALL = NOPASSWD: /usr/sbin/hpacucli controller slot=[0-9] show status',
'ALL = NOPASSWD: /usr/sbin/hpacucli controller slot=[0-9] show detail',
],
}
nrpe::monitor_service { 'raid_hpssacli':
description => 'HP RAID',
nrpe_command => '/usr/local/lib/nagios/plugins/check_hpssacli',
timeout => 90, # can take > 10s on servers with lots of disks
check_interval => $raid::check_interval,
retry_interval => $raid::retry_interval,
event_handler => "raid_handler!hpssacli!${::site}",
notes_url => 'https://wikitech.wikimedia.org/wiki/Dc-operations/Hardware_Troubleshooting_Runbook#Hardware_Raid_Information_Gathering',
}
nrpe::plugin { 'get-raid-status-hpssacli':
source => 'puppet:///modules/raid/get-raid-status-hpssacli.sh';
}
nrpe::check { 'get_raid_status_hpssacli':
command => '/usr/local/lib/nagios/plugins/get-raid-status-hpssacli -c',
}
}
|