Puppet Class: datadog_agent::integrations::activemq_xml

Inherits:
datadog_agent::params
Defined in:
manifests/integrations/activemq_xml.pp

Overview

Class: datadog_agent::integrations::activemq_xml

This class will install the necessary configuration for the activemq_xml integration.

See the sample activemq.d/conf.yaml for all available configuration options. github.com/DataDog/integrations-core/blob/master/activemq/datadog_checks/activemq/data/conf.yaml.example

See the metrics.yaml file for the list of default collected metrics. github.com/DataDog/integrations-core/blob/master/activemq/datadog_checks/activemq/data/metrics.yaml

This check has a limit of 350 metrics per instance. If you require additional metrics, contact Datadog Support at docs.datadoghq.com/help/

Parameters:

$url
    ActiveMQ administration web URL to gather the activemq_xml stats from.
$username
    Username to use for authentication - optional
$password
    Password to use for authentication - optional
$suppress_errors
   Supress connection errors if URL is expected to be offline at times (eg. standby host) - optional
$detailed_queues
   List of queues to monitor, required if you have more than 300 queues you wish to track, otherwise optional.
$detailed_topics
   List of topics to monitor, required if you have more than 300 topics you wish to track, otherwise optional.
$detailed_subscribers
   List of subscribers to monitor, required if you have more than 300 subscribers you wish to track, otherwise optional.

Sample Usage:

class { 'datadog_agent::integrations::activemq_xml' :
  url     => 'http://localhost:8161',
  username => 'datadog',
  password => 'some_pass',
  suppress_errors => false,
  detailed_queues => ['queue1', 'queue2', 'queue3'],
  detailed_topics => ['topic1', 'topic2', 'topic3'],
  detailed_subscribers => ['subscriber1', 'subscriber2', 'subscriber3'],
}

Hiera Usage:

datadog_agent::integrations::activemq_xml::instances:
  - url: 'http://localhost:8161'
    username: 'datadog'
    password: 'some_pass'
    suppress_errors: false
    detailed_queues: ['queue1', 'queue2', 'queue3']
    detailed_topics: ['topic1', 'topic2', 'topic3']
    detailed_subscribers: ['subscriber1', 'subscriber2', 'subscriber3']

Parameters:

  • url (String) (defaults to: 'http://localhost:8161')
  • supress_errors (Boolean) (defaults to: false)
  • suppress_errors (Boolean) (defaults to: $supress_errors)
  • username (Optional[String]) (defaults to: undef)
  • password (Optional[String]) (defaults to: undef)
  • detailed_queues (Array[String]) (defaults to: [])
  • detailed_topics (Array[String]) (defaults to: [])
  • detailed_subscribers (Array[String]) (defaults to: [])
  • instances (Optional[Array]) (defaults to: undef)


54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'manifests/integrations/activemq_xml.pp', line 54

class datadog_agent::integrations::activemq_xml (
  String $url                         = 'http://localhost:8161',
  Boolean $supress_errors             = false, # keep for backwards-compatibility
  Boolean $suppress_errors            = $supress_errors,
  Optional[String] $username          = undef,
  Optional[String] $password          = undef,
  Array[String] $detailed_queues      = [],
  Array[String] $detailed_topics      = [],
  Array[String] $detailed_subscribers = [],
  Optional[Array] $instances          = undef,
) inherits datadog_agent::params {
  require datadog_agent

  $dst_dir = "${datadog_agent::params::conf_dir}/activemq_xml.d"

  file { $dst_dir:
    ensure  => directory,
    owner   => $datadog_agent::dd_user,
    group   => $datadog_agent::params::dd_group,
    mode    => $datadog_agent::params::permissions_directory,
    require => Package[$datadog_agent::params::package_name],
    notify  => Service[$datadog_agent::params::service_name],
  }
  $dst = "${dst_dir}/conf.yaml"

  if !$instances and $url {
    $_instances = [{
        'url'                  => $url,
        'username'             => $username,
        'password'             => $password,
        'suppress_errors'      => $suppress_errors,
        'detailed_queues'      => $detailed_queues,
        'detailed_topics'      => $detailed_topics,
        'detailed_subscribers' => $detailed_subscribers,
    }]
  } elsif !$instances {
    $_instances = []
  } else {
    $_instances = $instances
  }

  file { $dst:
    ensure  => file,
    owner   => $datadog_agent::dd_user,
    group   => $datadog_agent::params::dd_group,
    mode    => $datadog_agent::params::permissions_protected_file,
    content => template('datadog_agent/agent-conf.d/activemq_xml.yaml.erb'),
    require => Package[$datadog_agent::params::package_name],
    notify  => Service[$datadog_agent::params::service_name],
  }
}