Puppet Class: webperf::statsv
- Defined in:
- modules/webperf/manifests/statsv.pp
Overview
SPDX-License-Identifier: Apache-2.0
Class: webperf::statsv
Sets up StatsV, a Web request -> Kafka -> StatsD bridge.
[kafka_brokers] string of comma separated Kafka bootstrap brokers
[kafka_security_protocol] one of "PLAINTEXT", "SSL", "SASL", "SASL_SSL"
[topics] Comma separated list of topics from which statsv should consume. Default: statsv
[statsd_host] host name of statsd instance. Default: localhost
[statsd_port] port of statsd instance. Default: 8125
[dogstatsd_host] host name of dogstatsd instance. Default: undef
[dogstatsd_port] port of dogstatsd instance. Default: 8125
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'modules/webperf/manifests/statsv.pp', line 27
class webperf::statsv(
String $kafka_brokers,
Optional[String] $kafka_security_protocol = 'PLAINTEXT',
String $topics = 'statsv',
Stdlib::Fqdn $statsd_host = 'localhost',
Integer $statsd_port = 8125,
Stdlib::Fqdn $dogstatsd_host = undef,
Integer $dogstatsd_port = 8125,
Optional[Stdlib::Unixpath] $kafka_ssl_cafile = undef,
) {
include ::webperf
stdlib::ensure_packages(['python3-kafka'])
scap::target { 'statsv/statsv':
service_name => 'statsv',
deploy_user => 'deploy-service',
}
# Uses $kafka_brokers, $kafka_security_protocol, $kafka_ssl_cafile, $statsd_host, and $dogstatsd_port
systemd::service { 'statsv':
content => template('webperf/statsv.service.erb'),
restart => true,
}
}
|