Puppet Class: ipmi::monitor
- Defined in:
- modules/ipmi/manifests/monitor.pp
Overview
SPDX-License-Identifier: Apache-2.0
2 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 55 56 57 58 59 60 61 62 63 64 65 |
# File 'modules/ipmi/manifests/monitor.pp', line 2
class ipmi::monitor (
Wmflib::Ensure $ensure = 'present'
) {
ensure_packages(['freeipmi-tools', 'freeipmi-ipmiseld'])
$ipmiseld_config = @(IPMISELDCONFIG)
# THIS FILE IS MANAGED BY PUPPET
interpret-oem-data ENABLE
entity-sensor-names ENABLE
| IPMISELDCONFIG
file { '/etc/freeipmi/ipmiseld.conf':
ensure => present,
owner => 'root',
group => 'root',
mode => '0440',
content => $ipmiseld_config,
require => Package['freeipmi-ipmiseld'],
notify => Service['ipmiseld'],
}
service { 'ipmiseld':
ensure => running,
enable => true,
require => Package['freeipmi-ipmiseld'],
}
if debian::codename::ge('bookworm') {
profile::auto_restarts::service { 'ipmiseld': }
}
file { '/var/cache/ipmiseld':
ensure => directory,
owner => 'root',
group => 'root',
before => Package['freeipmi-ipmiseld'],
}
# ipmi_devintf needs to be loaded for the checks to work properly (T167121)
nrpe::plugin { 'check_ipmi_sensor':
ensure => absent,
source => 'puppet:///modules/base/monitoring/check_ipmi_sensor',
}
kmod::module { 'ipmi_devintf':
ensure => present,
}
sudo::user { 'nagios_ipmi_sensor':
ensure => absent,
user => 'nagios',
privileges => ['ALL = NOPASSWD: /usr/sbin/ipmi-sel, /usr/sbin/ipmi-sensors'],
}
nrpe::monitor_service { 'check_ipmi_sensor':
ensure => absent,
description => 'IPMI Sensor Status',
nrpe_command => '/usr/local/lib/nagios/plugins/check_ipmi_sensor --noentityabsent -T Temperature -T Power_Supply --nosel',
check_interval => 30,
retry_interval => 10,
timeout => 60,
notes_url => 'https://wikitech.wikimedia.org/wiki/Dc-operations/Hardware_Troubleshooting_Runbook#Power_Supply_Failures',
}
}
|