Puppet Class: raid::megaraid
- Defined in:
- modules/raid/manifests/megaraid.pp
Overview
SPDX-License-Identifier: Apache-2.0 Megaraid controler
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 |
# File 'modules/raid/manifests/megaraid.pp', line 3
class raid::megaraid {
include raid
ensure_packages('megacli')
$get_raid_status_megacli = '/usr/local/lib/nagios/plugins/get-raid-status-megacli'
file { $get_raid_status_megacli:
ensure => present,
owner => 'root',
group => 'root',
mode => '0555',
source => 'puppet:///modules/raid/get-raid-status-megacli.py';
}
sudo::user { 'nagios_megaraid':
user => 'nagios',
privileges => ["ALL = NOPASSWD: ${get_raid_status_megacli}"],
}
nrpe::check { 'get_raid_status_megacli':
command => "/usr/bin/sudo ${get_raid_status_megacli} -c",
}
nrpe::monitor_service { 'raid_megaraid':
description => 'MegaRAID',
nrpe_command => "${raid::check_raid} megacli",
check_interval => $raid::check_interval,
retry_interval => $raid::retry_interval,
event_handler => "raid_handler!megacli!${::site}",
notes_url => 'https://wikitech.wikimedia.org/wiki/MegaCli#Monitoring',
}
}
|