manifests/integrations/apache.pp (26 lines of code) (raw):

# 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', # } # class datadog_agent::integrations::apache ( $url = 'http://localhost/server-status?auto', $username = undef, $password = undef, $tags = [], $disable_ssl_validation = false ) inherits datadog_agent::params { include datadog_agent validate_legacy('String', 'validate_string', $url) validate_legacy('Array', 'validate_array', $tags) validate_legacy('Boolean', 'validate_bool', $disable_ssl_validation) if !$::datadog_agent::agent5_enable { $dst = "${datadog_agent::conf6_dir}/apache.yaml" } else { $dst = "${datadog_agent::conf_dir}/apache.yaml" } file { $dst: ensure => file, owner => $datadog_agent::params::dd_user, group => $datadog_agent::params::dd_group, mode => '0600', content => template('datadog_agent/agent-conf.d/apache.yaml.erb'), require => Package[$datadog_agent::params::package_name], notify => Service[$datadog_agent::params::service_name] } }