Puppet Class: toil::rsyslog_imfile_remedy

Defined in:
modules/toil/manifests/rsyslog_imfile_remedy.pp

Overview

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: present)
  • period_hours (Integer) (defaults to: 3)


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'modules/toil/manifests/rsyslog_imfile_remedy.pp', line 8

class toil::rsyslog_imfile_remedy (
  Wmflib::Ensure $ensure       = present,
  Integer        $period_hours = 3,
) {

  $minute = fqdn_rand(59, 'rsyslog-imfile-remedy')

  systemd::timer::job { 'rsyslog-imfile-remedy':
    ensure          => $ensure,
    user            => 'root',
    description     => 'Restart rsyslog T357616',
    interval        => {
      'start'    => 'OnCalendar',
      'interval' => "*-*-* 00/${period_hours}:${minute}:00",
    },
    command         => '/usr/bin/systemctl try-restart rsyslog',
    logging_enabled => false, # log to journald
    splay           => 30,
  }

}