Puppet Class: snapshot::dumps::timechecker

Defined in:
modules/snapshot/manifests/dumps/timechecker.pp

Overview

Parameters:

  • dumpsbasedir (Any) (defaults to: undef)
  • xmldumpsuser (Any) (defaults to: undef)


1
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
# File 'modules/snapshot/manifests/dumps/timechecker.pp', line 1

class snapshot::dumps::timechecker(
    $dumpsbasedir = undef,
    $xmldumpsuser = undef,
)  {
    $repodir = $snapshot::dumps::dirs::repodir
    $wikis = ['arwiki', 'dewiki', 'commonswiki', 'frwiki', 'eswiki',
              'hewiki', 'huwiki', 'itwiki', 'jawiki', 'kowiki', 'metawiki',
              'nlwiki', 'plwiki', 'ptwiki', 'ruwiki', 'zhwiki',
              'enwiki', 'svwiki', 'ukwiki', 'viwiki', 'wikidatawiki']
    $wikis_list = join($wikis, ',')

    $apachedir = $snapshot::dumps::dirs::apachedir
    $dblist = "${apachedir}/dblists/all.dblist"

    systemd::timer::job { 'dumps-timecheck-wikilist':
        ensure                  => present,
        description             => 'Show runtimes for dumps (wiki list)',
        user                    => $xmldumpsuser,
        send_mail               => true,
        send_mail_to            => 'ops-dumps@wikimedia.org',
        send_mail_only_on_error => false,
        command                 => "/usr/bin/python3 show_runtimes.py -d ${dumpsbasedir} -W ${wikis_list}",
        working_directory       => $repodir,
        interval                => {'start' => 'OnCalendar', 'interval' => '*-*-1,20 01:10:00'}
    }

    systemd::timer::job { 'dumps-timecheck-dblist':
        ensure                  => present,
        description             => 'Show runtimes for dumps (dblist)',
        user                    => $xmldumpsuser,
        send_mail               => true,
        send_mail_to            => 'ops-dumps@wikimedia.org',
        send_mail_only_on_error => false,
        command                 => "/usr/bin/python3 show_runtimes.py -d ${dumpsbasedir} -j meta-history-bz2 -s 40 -w ${dblist}",
        working_directory       => $repodir,
        interval                => {'start' => 'OnCalendar', 'interval' => '*-*-1,20 02:10:00'}
    }
}