Puppet Class: prometheus::node_sge

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

Overview

Class: prometheus::node_sge

Periodically export SGE stats via node-exporter textfile collector.

Parameters:

  • outfile (Any) (defaults to: '/var/lib/prometheus/node.d/sge.prom')


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

class prometheus::node_sge (
    $outfile = '/var/lib/prometheus/node.d/sge.prom',
) {
    validate_re($outfile, '\.prom$')

    require_package('python3-prometheus-client')

    file { '/usr/local/bin/prometheus-sge-stats':
        ensure => file,
        mode   => '0555',
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/prometheus/usr/local/bin/prometheus-sge-stats.py',
    }

    # Collect every minute
    cron { 'prometheus_sge_stats':
        user    => 'root',
        command => "/usr/local/bin/prometheus-sge-stats --outfile ${outfile}",
    }
}