Puppet Class: stackdriver::plugin::tomcat
- Inherited by:
-
stackdriver::plugin::tomcat::config
- Defined in:
- manifests/plugin/tomcat.pp
Overview
vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 foldmethod=marker
Class: stackdriver::plugin::tomcat
Configure Stackdriver to monitor Tomcat feedback.stackdriver.com/knowledgebase/articles/244387-tomcat-monitoring
Parameters
- ensure
-
Default - present
-
Install or Remove all jmxtrans config files
- host
-
Default - localhost
-
Tomcat JMX Host
- port
-
Default - 9991
-
Tomcat JMX Port
- path
-
Default - /mnt/jmxtrans
-
jmxtrans location
- sysconfig
-
Default - none
-
Hash to create /etc/sysconfig/jmxtrans override variables
- apikey
-
Default - retrieve from hiera stackdriver::apikey
-
Stackdriver API Key
Usage
Puppet Code
Enable Tomcat monitoring via Puppet CODE:
include '::stackdriver::plugin::tomcat'
Hiera
Enable Tomcat monitoring via Hiera:
stackdriver::plugins:
- 'tomcat'
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'manifests/plugin/tomcat.pp', line 51
class stackdriver::plugin::tomcat(
$ensure = 'present',
$host = 'localhost',
$port = '9991',
$path = '/mnt/jmxtrans',
$sysconfig = {},
$apikey = hiera('stackdriver::apikey'),
) {
Class['stackdriver'] -> Class[$name]
validate_string ( $ensure )
validate_string ( $host )
validate_string ( $port )
validate_string ( $path )
if $sysconfig { validate_hash ( $sysconfig ) }
if $ensure == 'present' {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
contain "${name}::config"
}
|