Puppet Class: cloudinsight_agent::integrations::redis

Inherits:
cloudinsight_agent::params
Defined in:
manifests/integrations/redis.pp

Overview

Class: cloudinsight_agent::integrations::redis

This class will install the necessary configuration for the redis integration

Parameters:

$host:
    The host redis is running on
$password
    The redis password (optional)
$port
    The redis port
$tags
    Optional array of tags
$keys
    Optional array of keys to check length

Sample Usage:

class { 'cloudinsight_agent::integrations::redis' :
  host => 'localhost',
}

Parameters:

  • host (Any) (defaults to: 'localhost')
  • password (Any) (defaults to: '')
  • port (Any) (defaults to: 6379)
  • tags (Any) (defaults to: [])
  • keys (Any) (defaults to: [])


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'manifests/integrations/redis.pp', line 24

class cloudinsight_agent::integrations::redis(
  $host = 'localhost',
  $password = '',
  $port = 6379,
  $tags = [],
  $keys = [],
) inherits cloudinsight_agent::params {

  validate_re($port, '^\d+$')
  validate_array($tags)
  validate_array($keys)

  file { "${cloudinsight_agent::params::conf_dir}/redisdb.yaml":
    ensure  => file,
    owner   => $cloudinsight_agent::params::cloudinsight_user,
    group   => $cloudinsight_agent::params::cloudinsight_group,
    mode    => '0600',
    content => template('cloudinsight_agent/agent-conf.d/redisdb.yaml.erb'),
    require => Package[$cloudinsight_agent::params::package_name],
    notify  => Service[$cloudinsight_agent::params::service_name]
  }
}