Puppet Class: prometheus::node_ssh_open_sessions

Defined in:
modules/prometheus/manifests/node_ssh_open_sessions.pp

Overview

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: 'present')
  • outfile (Pattern[/\.prom$/]) (defaults to: '/var/lib/prometheus/node.d/ssh_open_sessions.prom')


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'modules/prometheus/manifests/node_ssh_open_sessions.pp', line 6

class prometheus::node_ssh_open_sessions (
    Wmflib::Ensure $ensure = 'present',
    Pattern[/\.prom$/] $outfile = '/var/lib/prometheus/node.d/ssh_open_sessions.prom',
) {
    file { '/usr/local/bin/prometheus-ssh_open_sessions':
        ensure => file,
        mode   => '0555',
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/prometheus/usr/local/bin/prometheus-ssh_open_sessions',
    }

    # Collect every 5 minutes
    systemd::timer::job { 'prometheus_ssh_open_sessions':
        ensure      => $ensure,
        description => 'Regular job to collect active shell session information',
        user        => 'root',
        command     => "/usr/local/bin/prometheus-ssh_open_sessions ${outfile}",
        interval    => {'start' => 'OnCalendar', 'interval' => '*-*-* *:0/5:0'},
    }
}