mirror of https://github.com/zulip/zulip.git
puppet: Rename and generalize Tornado process exporter.
Exporting stats about all of the various Zulip processes is useful for tracking memory leaks, etc.
This commit is contained in:
parent
b67108c8c6
commit
740a494ba4
|
@ -0,0 +1,26 @@
|
|||
process_names:
|
||||
- name: "tornado-{{.Matches.Port}}"
|
||||
comm:
|
||||
- python3
|
||||
cmdline:
|
||||
- runtornado\s+127\.0\.0\.1:(?P<Port>\S+)
|
||||
- name: "uwsgi-{{.Matches.Worker}}"
|
||||
comm:
|
||||
- uwsgi
|
||||
cmdline:
|
||||
- zulip-django uWSGI worker (?P<Worker>\d+)
|
||||
- name: process_fts_updates
|
||||
comm:
|
||||
- python3
|
||||
cmdline:
|
||||
- /usr/local/bin/process_fts_updates
|
||||
- name: "worker-{{.Matches.Queue}}"
|
||||
comm:
|
||||
- python3
|
||||
cmdline:
|
||||
- /home/zulip/deployments/current/manage.py process_queue --queue_name=(?P<Queue>\S+)
|
||||
- name: "deliver-scheduled-{{.Matches.What}}"
|
||||
comm:
|
||||
- python3
|
||||
cmdline:
|
||||
- /home/zulip/deployments/current/manage.py deliver_scheduled_(?P<What>\S+)
|
|
@ -1,6 +0,0 @@
|
|||
process_names:
|
||||
- name: "tornado-{{.Matches.Port}}"
|
||||
comm:
|
||||
- python3
|
||||
cmdline:
|
||||
- runtornado\s+127\.0\.0\.1:(?P<Port>\S+)
|
|
@ -1,13 +1,13 @@
|
|||
# @summary Prometheus monitoring of tornado processes
|
||||
# @summary Prometheus monitoring of Zulip server processes
|
||||
#
|
||||
class zulip_ops::prometheus::tornado {
|
||||
class zulip_ops::prometheus::process {
|
||||
include zulip_ops::prometheus::base
|
||||
include zulip::supervisor
|
||||
|
||||
$version = $zulip::common::versions['process_exporter']['version']
|
||||
$dir = "/srv/zulip-process_exporter-${version}"
|
||||
$bin = "${dir}/process-exporter"
|
||||
$conf = '/etc/zulip/tornado_process_exporter.yaml'
|
||||
$conf = '/etc/zulip/process_exporter.yaml'
|
||||
|
||||
zulip::external_dep { 'process_exporter':
|
||||
version => $version,
|
||||
|
@ -15,16 +15,16 @@ class zulip_ops::prometheus::tornado {
|
|||
tarball_prefix => "process-exporter-${version}.linux-${zulip::common::goarch}",
|
||||
}
|
||||
|
||||
zulip_ops::firewall_allow { 'tornado_exporter': port => '9256' }
|
||||
zulip_ops::firewall_allow { 'process_exporter': port => '9256' }
|
||||
file { $conf:
|
||||
ensure => file,
|
||||
require => User[zulip],
|
||||
owner => 'zulip',
|
||||
group => 'zulip',
|
||||
mode => '0644',
|
||||
source => 'puppet:///modules/zulip_ops/tornado_process_exporter.yaml',
|
||||
source => 'puppet:///modules/zulip_ops/process_exporter.yaml',
|
||||
}
|
||||
file { "${zulip::common::supervisor_conf_dir}/prometheus_tornado_exporter.conf":
|
||||
file { "${zulip::common::supervisor_conf_dir}/prometheus_process_exporter.conf":
|
||||
ensure => file,
|
||||
require => [
|
||||
User[zulip],
|
||||
|
@ -35,7 +35,7 @@ class zulip_ops::prometheus::tornado {
|
|||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
content => template('zulip_ops/supervisor/conf.d/prometheus_tornado_exporter.conf.template.erb'),
|
||||
content => template('zulip_ops/supervisor/conf.d/prometheus_process_exporter.conf.template.erb'),
|
||||
notify => Service[supervisor],
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
[program:prometheus_tornado_exporter]
|
||||
[program:prometheus_process_exporter]
|
||||
command=<%= @bin %> -config.path <%= @conf %>
|
||||
priority=10
|
||||
autostart=true
|
||||
autorestart=true
|
||||
user=zulip
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/var/log/zulip/tornado_exporter.log
|
||||
stdout_logfile=/var/log/zulip/process_exporter.log
|
Loading…
Reference in New Issue