Puppet Class: jmxtrans

Defined in:
modules/jmxtrans/manifests/init.pp

Overview

Class jmxtrans

Installs a jmxtrans package and ensures that the jmxtrans service is running. The jmxtrans::metrics define includes this class, so you probably don't need to use it directly.

Parameters

$run_interval - seconds between runs of jmx queries. Default: 15 $log_level - level at which to log jmxtrans messages. Default: 'info' $version - version of jmxtrans to install. Default: installed (no preference)

Parameters:

  • run_interval (Any) (defaults to: 15)
  • log_level (Any) (defaults to: 'info')
  • version (Any) (defaults to: 'installed')


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
# File 'modules/jmxtrans/manifests/init.pp', line 11

class jmxtrans(
    $run_interval = 15,
    $log_level    = 'info',
    $version      = 'installed'
)
{
    package { 'jmxtrans':
        ensure  => $version,
    }

    file { '/etc/jmxtrans':
        ensure  => 'directory',
        owner   => 'jmxtrans',
        group   => 'jmxtrans',
        require => Package['jmxtrans'],
    }
    file { '/etc/default/jmxtrans':
        content => template('jmxtrans/jmxtrans.default.erb')
    }

    service { 'jmxtrans':
        ensure    => 'running',
        enable    => true,
        require   => Package['jmxtrans'],
        subscribe => File['/etc/default/jmxtrans'],
    }
}