Puppet Class: stackdriver::plugin::rabbitmq

Inherited by:
stackdriver::plugin::rabbitmq::config
Defined in:
manifests/plugin/rabbitmq.pp

Overview

vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 foldmethod=marker

Class: stackdriver::plugin::rabbitmq

Enable RabbitMQ Agent Plugin for Stackdriver Agent

Parameters


config
  • Default - /opt/stackdriver/collectd/etc/collectd.d/rabbitmq.conf

  • Plugin configuration file

vhost
  • Default - %2F

  • vhost needs to be url encoded, default vhost is “/”

port
  • Default - 15672

  • management port, default to 15672

queue
  • Default - undef (optional)

  • Queue name

user
  • Default - guest

  • Target user

password
  • Default - guest

  • Target user password

Usage


Puppet Code

Enable RabbitMQ plugin via Puppet CODE:

include '::stackdriver::plugin::rabbitmq'

Hiera

Enable RabbitMQ plugin via Hiera:

stackdriver::plugins:
 - 'rabbitmq'

Parameters:

  • config (Any) (defaults to: '/opt/stackdriver/collectd/etc/collectd.d/rabbitmq.conf')
  • vhost (Any) (defaults to: '%2F')
  • port (Any) (defaults to: '15672')
  • queue (Any) (defaults to: undef)
  • user (Any) (defaults to: 'guest')
  • password (Any) (defaults to: 'guest')


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'manifests/plugin/rabbitmq.pp', line 50

class stackdriver::plugin::rabbitmq(

  $config   =  '/opt/stackdriver/collectd/etc/collectd.d/rabbitmq.conf',
  $vhost    = '%2F',
  $port     = '15672',
  $queue    = undef,
  $user     = 'guest',
  $password = 'guest',

) {

  validate_string ( $config   )
  validate_string ( $vhost    )
  validate_string ( $port     )
  validate_string ( $user     )
  validate_string ( $password )
  validate_string ( $queue    )

  contain "${name}::config"

  # Install package
  ensure_resource('package', 'yajl', {
    'ensure'  => 'present',
  })

}