2022-01-01 05:00:17 +01:00
|
|
|
# @summary Prometheus monitoring of uwsgi servers
|
|
|
|
#
|
|
|
|
class zulip_ops::prometheus::uwsgi {
|
2023-03-30 20:02:42 +02:00
|
|
|
include zulip_ops::prometheus::base
|
|
|
|
include zulip::supervisor
|
|
|
|
|
2022-01-01 05:00:17 +01:00
|
|
|
$version = $zulip::common::versions['uwsgi_exporter']['version']
|
|
|
|
$dir = "/srv/zulip-uwsgi_exporter-${version}"
|
|
|
|
$bin = "${dir}/uwsgi_exporter"
|
2022-02-11 20:37:31 +01:00
|
|
|
|
2022-01-01 05:00:17 +01:00
|
|
|
zulip::external_dep { 'uwsgi_exporter':
|
|
|
|
version => $version,
|
2022-02-11 20:37:31 +01:00
|
|
|
url => "https://github.com/timonwong/uwsgi_exporter/releases/download/v${version}/uwsgi_exporter-${version}.linux-${zulip::common::goarch}.tar.gz",
|
|
|
|
tarball_prefix => "uwsgi_exporter-${version}.linux-${zulip::common::goarch}",
|
2022-01-01 05:00:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
zulip_ops::firewall_allow { 'uwsgi_exporter': port => '9238' }
|
|
|
|
file { "${zulip::common::supervisor_conf_dir}/prometheus_uwsgi_exporter.conf":
|
|
|
|
ensure => file,
|
|
|
|
require => [
|
|
|
|
User[zulip],
|
|
|
|
Package[supervisor],
|
2022-02-08 08:28:57 +01:00
|
|
|
Zulip::External_Dep['uwsgi_exporter'],
|
2022-01-01 05:00:17 +01:00
|
|
|
],
|
|
|
|
owner => 'root',
|
|
|
|
group => 'root',
|
|
|
|
mode => '0644',
|
|
|
|
content => template('zulip_ops/supervisor/conf.d/prometheus_uwsgi_exporter.conf.template.erb'),
|
|
|
|
notify => Service[supervisor],
|
|
|
|
}
|
|
|
|
}
|