Puppet Class: datadog_agent::integrations::apache
- Inherits:
- datadog_agent::params
- Defined in:
- manifests/integrations/apache.pp
Overview
Class: datadog_agent::integrations::apache
This class will install the necessary configuration for the apache integration
Parameters:
$url:
The URL for apache status URL handled by mod-status.
Defaults to http://localhost/server-status?auto
$username:
$password:
If your service uses basic authentication, you can optionally
specify a username and password that will be used in the check.
Optional.
$tags
Optional array of tags
Sample Usage:
include ‘datadog_agent::integrations::apache’
OR
class { ‘datadog_agent::integrations::apache’:
url => 'http://example.com/server-status?auto',
username => 'status',
password => 'hunter1',
}
29 30 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 |
# File 'manifests/integrations/apache.pp', line 29
class datadog_agent::integrations::apache (
String $url = 'http://localhost/server-status?auto',
Optional[String] $username = undef,
Optional[String] $password = undef,
Array $tags = [],
Boolean $disable_ssl_validation = false
) inherits datadog_agent::params {
require ::datadog_agent
$legacy_dst = "${datadog_agent::params::legacy_conf_dir}/apache.yaml"
if $::datadog_agent::_agent_major_version > 5 {
$dst_dir = "${datadog_agent::params::conf_dir}/apache.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/apache.yaml.erb'),
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
}
|