Puppet Class: kibana

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

Overview

Class: kibana

Kibana is a JavaScript web application for visualizing log data and other types of time-stamped data. It integrates with ElasticSearch and LogStash.

Parameters:

  • $default_app_id: Default landing page. You can specify files, scripts or

    saved dashboards here. Default: '/dashboard/file/default.json'.
  • $enable_phatality: Defaults to true. Adds the phatality package to kibana

Sample usage:

class { 'kibana':
    default_app_id => 'dashboard/default',
}

Parameters:

  • default_app_id (String) (defaults to: 'dashboard/default')
  • kibana_package (String) (defaults to: 'kibana')
  • enable_phatality (Boolean) (defaults to: true)


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'modules/kibana/manifests/init.pp', line 17

class kibana (
    String $default_app_id = 'dashboard/default',
    String $kibana_package = 'kibana',
    Boolean $enable_phatality = true
) {
    package { 'kibana':
        ensure => 'present',
        name   => $kibana_package,
    }

    # ugly hack to solve https://phabricator.wikimedia.org/T192279 / https://github.com/elastic/kibana/issues/12915
    file { '/usr/share/kibana/optimize/bundles/stateSessionStorageRedirect.style.css':
        ensure => present,
        owner  => 'kibana',
        group  => 'kibana',
        mode   => '0664',
    }

    file { '/etc/kibana/kibana.yml':
        ensure  => file,
        owner   => 'root',
        group   => 'root',
        content => ordered_yaml({
            'kibana.defaultAppId'    => $default_app_id,
            'logging.quiet'          => true,
            'server.maxPayloadBytes' => 4194304, # 4MB (yes, this is a crazy limit, we need to reduce the number of fields)
            'metrics.enabled'        => false, # T255863
            'timelion.enabled'       => false, #T259000
            'region_map.enabled'     => false, #T259000
            'tile_map.enabled'       => false, #T259000
            'telemetry.enabled'      => false, # T259794
            'newsfeed.enabled'       => false, # T259794
        }),
        mode    => '0444',
        require => Package['kibana'],
    }

    service { 'kibana':
        ensure  => running,
        enable  => true,
        require => [
            Package['kibana'],
            File['/etc/kibana/kibana.yml'],
        ],
    }

    if $enable_phatality {
      class { '::kibana::phatality': }
    }
}