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
21 22 23 24 25 26 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 52 53 54 55 |
# File 'modules/webperf/manifests/statsv.pp', line 21
class webperf::statsv(
String $kafka_brokers,
Optional[String] $kafka_security_protocol = 'PLAINTEXT',
String $topics = 'statsv',
Stdlib::Fqdn $statsd_host = 'localhost',
Integer $statsd_port = 8125,
Optional[Stdlib::Unixpath] $kafka_ssl_cafile = undef,
) {
include ::webperf
ensure_packages(['python3-kafka'])
scap::target { 'statsv/statsv':
service_name => 'statsv',
deploy_user => 'deploy-service',
}
# Uses $kafka_brokers, $kafka_security_protocol, $kafka_ssl_cafile, and $statsd
systemd::unit { 'statsv':
ensure => present,
content => template('webperf/statsv.service.erb'),
restart => true,
}
service { 'statsv':
ensure => running,
provider => systemd,
}
nrpe::monitor_service { 'statsv':
description => 'statsv process',
nrpe_command => '/usr/lib/nagios/plugins/check_procs -c 1: -C python3 -a statsv',
notes_url => 'https://wikitech.wikimedia.org/wiki/Graphite#statsv',
}
}
|