Puppet Class: stackdriver::plugin::nginx

Inherited by:
stackdriver::plugin::nginx::config
Defined in:
manifests/plugin/nginx.pp

Overview

vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 foldmethod=marker

Class: stackdriver::plugin::nginx

Enable Nginx Agent Plugin for Stackdriver Agent

Parameters


config
  • Default - /opt/stackdriver/collectd/etc/collectd.d/nginx.conf (string - absolute path)

  • Plugin Configuration File

url
user
  • Default - undef (string)

  • Target user

password
  • Default - undef (string)

  • Target user password

verifypeer
  • Default - undef (boolean)

  • Enable or disable peer SSL certificate verification

verifyhost
  • Default - undef (boolean)

  • Enable or disable peer host name verification

cacert
  • Default - undef (string - absolute path)

  • File that holds one or more SSL certificates

Usage


Puppet Code

Enable Nginx plugin via Puppet CODE:

include '::stackdriver::plugin::nginx'

Hiera

Enable Nginx plugin via Hiera:

stackdriver::plugins:
 - 'nginx'

Parameters:

  • config (Any) (defaults to: '/opt/stackdriver/collectd/etc/collectd.d/nginx.conf')
  • url (Any) (defaults to: 'http://127.0.0.1/nginx_status')
  • user (Any) (defaults to: undef)
  • password (Any) (defaults to: undef)
  • verifypeer (Any) (defaults to: undef)
  • verifyhost (Any) (defaults to: undef)
  • cacert (Any) (defaults to: undef)


54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'manifests/plugin/nginx.pp', line 54

class stackdriver::plugin::nginx(

  $config     =  '/opt/stackdriver/collectd/etc/collectd.d/nginx.conf',

  $url        = 'http://127.0.0.1/nginx_status',
  $user       = undef,
  $password   = undef,
  $verifypeer = undef,
  $verifyhost = undef,
  $cacert     = undef,

) {

  Class['stackdriver'] -> Class[$name]

  validate_absolute_path  ( $config )
  validate_string         ( $url    )

  if $user        != undef { validate_string        ( $user       ) }
  if $password    != undef { validate_string        ( $password   ) }
  if $verifypeer  != undef { validate_bool          ( $verifypeer ) }
  if $verifyhost  != undef { validate_bool          ( $verifyhost ) }
  if $cacert      != undef { validate_absolute_path ( $cacert     ) }

  #contain "${name}::install"

  #class { "::${name}::config": require => Class["::${name}::install"] }
  contain "${name}::config"

}