Puppet Class: datadog_agent::integrations::cassandra

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

Overview

Class: datadog_agent::integrations::cassandra

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

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

See the metrics.yaml file for the list of default collected metrics. github.com/DataDog/integrations-core/blob/master/cassandra/datadog_checks/cassandra/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:

$host:
    The hostname Cassandra is running on
$port:
    The port to connect on
$user
    The user for the datadog user
$password
    The password for the datadog user
$tags
    Optional array of tags

Sample Usage:

class { 'datadog_agent::integrations::cassandra' :
  host     => 'localhost',
  tags     => {
    environment => "production",
  },
}

Parameters:

  • host (String) (defaults to: 'localhost')
  • port (Integer) (defaults to: 7199)
  • user (Optional[String]) (defaults to: undef)
  • password (Optional[String]) (defaults to: undef)
  • tags (Hash) (defaults to: {})
  • max_returned_metrics (Optional[Integer]) (defaults to: undef)


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
67
68
# File 'manifests/integrations/cassandra.pp', line 37

class datadog_agent::integrations::cassandra (
  String $host                            = 'localhost',
  Integer $port                           = 7199,
  Optional[String] $user                  = undef,
  Optional[String] $password              = undef,
  Hash $tags                              = {},
  Optional[Integer] $max_returned_metrics = undef,
) inherits datadog_agent::params {
  require datadog_agent

  $dst_dir = "${datadog_agent::params::conf_dir}/cassandra.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"

  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/cassandra.yaml.erb'),
    require => Package[$datadog_agent::params::package_name],
    notify  => Service[$datadog_agent::params::service_name],
  }
}