Puppet Class: mariadb::heartbeat

Defined in:
modules/mariadb/manifests/heartbeat.pp

Overview

mariadb heartbeat capability

Parameters:

  • enabled (Any) (defaults to: false)
  • interval (Any) (defaults to: 1)
  • shard (Any) (defaults to: 'unknown')
  • datacenter (Any) (defaults to: 'none')
  • socket (Any) (defaults to: '/run/mysqld/mysqld.sock')
  • override_binlog_format (Any) (defaults to: undef)


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
# File 'modules/mariadb/manifests/heartbeat.pp', line 2

class mariadb::heartbeat (
    $enabled    = false,
    $interval   = 1,
    $shard      = 'unknown',
    $datacenter = 'none',
    $socket     = '/run/mysqld/mysqld.sock',
    $override_binlog_format = undef,
) {


    # custom modified version of pt-heartbeat that includes an
    # extra column "shard"
    file { '/usr/local/bin/pt-heartbeat-wikimedia':
        owner  => 'root',
        group  => 'root',
        mode   => '0555',
        source => 'puppet:///modules/mariadb/pt-heartbeat-wikimedia',
    }

    $binlog_format = $override_binlog_format ? {
        undef => $mariadb::config::binlog_format,
        default => $override_binlog_format
    }
    systemd::service { 'pt-heartbeat-wikimedia':
        content        => template('mariadb/pt-heartbeat-wikimedia.service.erb'),
        restart        => true,
        service_params => {
            ensure => $enabled,
        }
    }
}