Enable statsd for jenkins-log-client

Change-Id: I4395ce2151fc666cae1d9ea76b43bc3663e98ac8
This commit is contained in:
James E. Blair 2014-02-21 10:53:38 -08:00
parent cc5d9265ec
commit bba311f301
2 changed files with 15 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#
class log_processor::client (
$config_file,
$statsd_host = '',
) {
file { '/etc/logstash/jenkins-log-client.yaml':
@ -37,9 +38,18 @@ class log_processor::client (
require => [
File['/usr/local/bin/log-gearman-client.py'],
File['/etc/logstash/jenkins-log-client.yaml'],
File['/etc/default/jenkins-log-client'],
],
}
file { '/etc/default/jenkins-log-client':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
content => template('log_processor/jenkins-log-client.default.erb'),
}
service { 'jenkins-log-client':
enable => true,
hasrestart => true,

View File

@ -0,0 +1,5 @@
<% if scope.lookupvar("log_processor::client::statsd_host") != "" %>
export STATSD_HOST=<%= scope.lookupvar("log_processor::client::statsd_host") %>
export STATSD_PORT=8125
export STATSD_PREFIX="logstash.geard"
<% end %>