Puppet Class: cloudinsight_agent::integrations::nginx

Inherits:
cloudinsight_agent::params
Defined in:
manifests/integrations/nginx.pp

Overview

Class: cloudinsight_agent::integrations::nginx

This class will install the necessary configuration for the nginx integration

Parameters:

$instances:
    Array of hashes for all nginx urls and associates tags. See example

Sample Usage:

class { 'cloudinsight_agent::integrations::nginx':
  instances => [
      {
          'nginx_status_url'  => 'http://example.com/nginx_status/',
      },
      {
          'nginx_status_url'  => 'http://example2.com:1234/nginx_status/',
          'tags' => ['instance:foo'],
      },
  ],
}

Parameters:

  • instances (Any) (defaults to: [])


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'manifests/integrations/nginx.pp', line 25

class cloudinsight_agent::integrations::nginx(
  $instances = [],
) inherits cloudinsight_agent::params {

  validate_array($instances)

  file { "${cloudinsight_agent::params::conf_dir}/nginx.yaml":
    ensure  => file,
    owner   => $cloudinsight_agent::params::cloudinsight_user,
    group   => $cloudinsight_agent::params::cloudinsight_group,
    mode    => '0600',
    content => template('cloudinsight_agent/agent-conf.d/nginx.yaml.erb'),
    require => Package[$cloudinsight_agent::params::package_name],
    notify  => Service[$cloudinsight_agent::params::service_name]
  }
}