Puppet Class: datadog_agent::integrations::tomcat
- Inherits:
- datadog_agent::params
- Defined in:
- manifests/integrations/tomcat.pp
Overview
Class: datadog_agent::integrations::tomcat
This class will install the necessary configuration for the tomcat integration
Parameters:
$hostname:
The host tomcat is running on. Defaults to 'localhost'
$port
The JMX port.
$jmx_url
The JMX URL.
$username
The username for connecting to the running JVM. Optional.
$password
The password for connecting to the running JVM. Optional.
$java_bin_path
The path to the Java binary. Should be set if the agent cannot find your java executable. Optional.
$trust_store_path
The path to the trust store. Should be set if ssl is enabled. Optional.
$trust_store_password
The trust store password. Should be set if ssl is enabled. Optional.
$tags
Optional hash of tags { env => 'prod' }.
Sample Usage:
class { 'datadog_agent::integrations::tomcat':
port => 8081,
}
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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'manifests/integrations/tomcat.pp', line 31
class datadog_agent::integrations::tomcat(
$hostname = 'localhost',
$port = 7199,
$jmx_url = undef,
$username = undef,
$password = undef,
$java_bin_path = undef,
$trust_store_path = undef,
$trust_store_password = undef,
$tags = {},
) inherits datadog_agent::params {
require ::datadog_agent
$legacy_dst = "${datadog_agent::params::legacy_conf_dir}/tomcat.yaml"
if $::datadog_agent::_agent_major_version > 5 {
$dst_dir = "${datadog_agent::params::conf_dir}/tomcat.d"
file { $legacy_dst:
ensure => 'absent'
}
file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::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"
} else {
$dst = $legacy_dst
}
file { $dst:
ensure => file,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => $datadog_agent::params::permissions_protected_file,
content => template('datadog_agent/agent-conf.d/tomcat.yaml.erb'),
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
}
|