Installs stackdriver-agent.
- Puppet version 3.4 or greater with Hiera support
- Puppet Forge modules:
| OS Family | Module |
|---|---|
| ALL | puppetlabs/stdlib |
| Debian | puppetlabs/apt |
| Windows | puppetlabs/registry, joshcooper/powershell |
Supported/tested Operating Systems by OS Family:
- Debian
- Ubuntu
- RedHat
- Amazon
- CentOS
- Fedora
- Windows
- Server 2008
- Server 2012
This module requires a Stackdriver account. Free trial accounts are available at their website.
The stackdriver class includes the client:
include stackdriverYou must specify your Stackdriver API key:
- Using Hiera (recommended)
stackdriver::apikey: 'OMGBECKYLOOKATHERBUTTITSJUSTSOBIG'- Using Puppet Code
class { 'stackdriver':
apikey => 'OMGBECKYLOOKATHERBUTTITSJUSTSOBIG',
}Two methods are supported for enabling plugins.
Plugin settings may be configured via Hiera using the following format:
stackdriver::plugin::<plugin name>::<param>:<value>Using an External Node Classifier
Load the
stackdriver::plugin::<plugin name>classUsing Hiera
Plugins may optionally be loaded using hiera itself. NOTE: an array merge is used to collect the plugin list.
stackdriver::plugins: - 'plugin name' - 'plugin name'
Using Puppet Code
Plugins may be enabled via puppet code while keeping the plugin settings in Hiera.
stackdriver::plugin { 'plugin name': }
Plugin settings may be specified during class load.
Using an External Node Classifier
Load the
stackdriver::plugin::<plugin name>class and specify the class parameters.Using Puppet Code
class { 'stackdriver::plugin::<plugin name>': param1 => 'value', param2 => 'value', }
Plugin defaults are shown using the recommended Hiera format. Values enclosed in <> do not have defaults and are required. Values enclosed in () have an undef default and are optional.
Configures the redis plugin on the local host running on port 6379. Note: this module requires hiredis-devel be available to the system.
stackdriver::plugin::redis::host: 'localhost'stackdriver::plugin::redis::port: '6379'stackdriver::plugin::redis::timeout: '2000'Configures the memcahed plugin on the local host running on port 11211. All settings are optional.
stackdriver::plugin::memcahed::host: 'localhost'stackdriver::plugin::memcahed::port: '11211'Configures the MongoDB plugin on the local host running on port 27017.
stackdriver::plugin::mongo::host: 'localhost'stackdriver::plugin::mongo::user: 'stackdriver'stackdriver::plugin::mongo::password: 'ahzae8aiLiKoe'stackdriver::plugin::mongo::port: '27017'Configures the Postgreqsql plugin on the local host using UNIX domain sockets. Prerequisites for this plugin are documented on Stackdriver's support site.
stackdriver::plugin::postgres::user: 'stackdriver'stackdriver::plugin::postgres::password: 'xoiboov9Pai5e'stackdriver::plugin::postgres::dbname: '<REQUIRED PARAM>'Configures the nginx plugin on the local host running on port 80 (with authentication).
stackdriver::plugin::nginx::url: 'http://127.0.0.1/nginx_status'stackdriver::plugin::nginx::user: 'stackdriver'stackdriver::plugin::nginx::password: 'Eef3haeziqu3j'Configures the nginx plugin on the local host running on port 443 (SSL, no authentication, no verification).
stackdriver::plugin::nginx::url: 'https://127.0.0.1/nginx_status'stackdriver::plugin::nginx::verifypeer: falsestackdriver::plugin::nginx::verifyhost: falseConfigures the apache plugin on the local host running on port 80. User and Password settings are only required if the URL requires authentication.
stackdriver::plugin::apache::user: '(OPTIONAL USER)'stackdriver::plugin::apache::password: '(OPTIONAL USER PASSWORD)'stackdriver::plugin::apache::url: 'http://127.0.0.1/mod_status?auto'Configures the Elasticsearch plugin on the local host using port 9200. Host and Port settings are optional. Prerequisites for this plugin are documented on Stackdriver's support site.
stackdriver::plugin::elasticsearch::host: 'localhost'stackdriver::plugin::elasticsearch::port: '9200'Configures the RabbitMQ plugin on the local host running on port 5672. All settings are required.
stackdriver::plugin::rabbitmq::vhost: '%2F'stackdriver::plugin::rabbitmq::port: '15672'stackdriver::plugin::rabbitmq::queue: '(Queue Name)'stackdriver::plugin::rabbitmq::user: 'guest'stackdriver::plugin::rabbitmq::password: 'guest'Configures monitoring for Tomcat on the local host running JMX on port 9991.
For reference on Stackdriver's support site.
You can use the sysconfig parameter to create the /etc/sysconfig/jmxtrans override config.
stackdriver::plugin::tomcat::ensure: 'present'stackdriver::plugin::tomcat::host: 'localhost'stackdriver::plugin::tomcat::port: '9991'stackdriver::plugin::tomcat::path: '/mnt/jmxtrans'stackdriver::plugin::tomcat::sysconfig:
'JAVA_HOME': '/usr/java/jdk1.7.0_45/'Pre-requisite: Enabling JMX remote on Tomcat is outside the scope of this module, below are the changes you need to apply to your Tomcat.
# Enable JMX Monitoring on Tomcat (/etc/sysconfig/tomcat)
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.port=9991"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="${JAVA_OPTS} -Djava.rmi.server.hostname=<%= @fqdn %>"
- Stackdriver Website: http://www.stackdriver.com
- Stackdriver Signup: http://www.stackdriver.com/signup