Puppet Class: beats::packetbeat

Inherited by:
beats::packetbeat::config
Defined in:
manifests/packetbeat.pp

Overview

Packetbeat class

Parameters:

  • ensure (Any) (defaults to: present)
  • interfaces (Any) (defaults to: 'any')
  • int_snaplen (Any) (defaults to: undef)
  • int_sniffer_type (Any) (defaults to: undef)
  • int_buffer_size (Any) (defaults to: undef)
  • http_enabled (Any) (defaults to: $beats::http_enabled)
  • mysql_enabled (Any) (defaults to: $beats::mysql_enabled)
  • pgsql_enabled (Any) (defaults to: $beats::pgsql_enabled)
  • redis_enabled (Any) (defaults to: $beats::redis_enabled)
  • http_ports (Any) (defaults to: ['80', '8080', '8000'])
  • http_hide_keywords (Any) (defaults to: [])
  • http_send_headers (Any) (defaults to: ['Host'])
  • http_split_cookie (Any) (defaults to: true)
  • http_real_ip_header (Any) (defaults to: 'X-Forwarded-For')
  • http_redact_authorization (Any) (defaults to: false)
  • mysql_protocol (Any) (defaults to: 'mysql')
  • mysql_ports (Any) (defaults to: ['3306'])
  • mysql_max_rows (Any) (defaults to: undef)
  • mysql_max_row_length (Any) (defaults to: undef)
  • pgsql_protocol (Any) (defaults to: 'pgsql')
  • pgsql_ports (Any) (defaults to: ['5432'])
  • pgsql_max_rows (Any) (defaults to: undef)
  • pgsql_max_row_length (Any) (defaults to: undef)


2
3
4
5
6
7
8
9
10
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'manifests/packetbeat.pp', line 2

class beats::packetbeat (
  $ensure                    = present,
  $interfaces                = 'any',
  $int_snaplen               = undef,
  $int_sniffer_type          = undef,
  $int_buffer_size           = undef,
  $http_enabled              = $beats::http_enabled,
  $mysql_enabled             = $beats::mysql_enabled,
  $pgsql_enabled             = $beats::pgsql_enabled,
  $redis_enabled             = $beats::redis_enabled,
  $http_ports                = ['80', '8080', '8000'],
  $http_hide_keywords        = [],
  $http_send_headers         = ['Host'],
  $http_split_cookie         = true,
  $http_real_ip_header       = 'X-Forwarded-For',
  $http_redact_authorization = false,
  $mysql_protocol            = 'mysql',
  $mysql_ports               = ['3306'],
  $mysql_max_rows            = undef,
  $mysql_max_row_length      = undef,
  $pgsql_protocol            = 'pgsql',
  $pgsql_ports               = ['5432'],
  $pgsql_max_rows            = undef,
  $pgsql_max_row_length      = undef,
){
  include beats::packetbeat::config

  case $::osfamily {
    'Debian': {
      include ::apt::update
      package {'packetbeat':
        ensure  => $beats::packetbeat::ensure,
        require => Class['apt::update']
      }
    }
    'RedHat': {
      package {'packetbeat':
        ensure  => $beats::packetbeat::ensure,
      }
    }
    default: { fail("${::osfamily} not supported yet") }
  }
  case $beats::packetbeat::ensure {
    'absent','purged': {
      service { 'packetbeat':
        ensure => 'stopped',
        enable => false,
      } 
    }
    default: {      
      service { 'packetbeat':
        ensure => running,
        enable => true,
      }
      Package['packetbeat'] -> Class['beats::packetbeat::config'] ~> Service['packetbeat']
    }
  }
}