Defined Type: swift::stats::stats_container

Defined in:
modules/swift/manifests/stats/stats_container.pp

Overview

Parameters:

  • account_name (Any)
  • container_set (Any)
  • statsd_prefix (Any)
  • ensure (Wmflib::Ensure) (defaults to: present)
  • statsd_host (Any) (defaults to: 'localhost')
  • statsd_port (Any) (defaults to: 9125)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'modules/swift/manifests/stats/stats_container.pp', line 1

define swift::stats::stats_container (
    $account_name,
    $container_set,
    $statsd_prefix,
    Wmflib::Ensure $ensure = present,
    $statsd_host = 'localhost',
    $statsd_port = 9125,
) {
    $account_file = "/etc/swift/account_${account_name}.env"

    systemd::timer::job { "swift-container-stats_${title}":
        ensure          => $ensure,
        description     => 'Regular jobs to report container statistics',
        user            => 'root',
        command         => "/usr/local/bin/swift-container-stats-timer.sh ${account_file} ${statsd_prefix} ${statsd_host} ${statsd_port} ${container_set}",
        logging_enabled => false,
        interval        => {'start' => 'OnCalendar', 'interval' => '*-*-* *:0/10:00'},
        require         => [
            File[$account_file],
            File['/usr/local/bin/swift-container-stats']
        ],
    }
}