puppet: Move frontend monitoring into its own file.

This allows it to be pulled in for deploys like czo, which don't use
the full `zulip_ops::app_frontend`, but we wish to monitor.
This commit is contained in:
Alex Vandiver 2020-10-12 17:21:30 -07:00 committed by Tim Abbott
parent fbf7cb82a7
commit f61ac4a28d
2 changed files with 25 additions and 21 deletions

View File

@ -4,6 +4,7 @@ class zulip_ops::app_frontend {
include zulip::rabbit include zulip::rabbit
include zulip::postfix_localmail include zulip::postfix_localmail
include zulip::static_asset_compiler include zulip::static_asset_compiler
include zulip::app_frontend_monitoring
$app_packages = [# Needed for the ssh tunnel to the redis server $app_packages = [# Needed for the ssh tunnel to the redis server
'autossh', 'autossh',
] ]
@ -45,25 +46,4 @@ class zulip_ops::app_frontend {
mode => '0644', mode => '0644',
source => 'puppet:///modules/zulip_ops/cron.d/fetch-contributor-data', source => 'puppet:///modules/zulip_ops/cron.d/fetch-contributor-data',
} }
# Enable some munin plugins
$munin_plugins = [
'rabbitmq_connections',
'rabbitmq_consumers',
'rabbitmq_messages',
'rabbitmq_messages_unacknowledged',
'rabbitmq_messages_uncommitted',
'rabbitmq_queue_memory',
'zulip_send_receive_timing',
]
zulip_ops::munin_plugin { $munin_plugins: }
file { '/etc/cron.d/rabbitmq-monitoring':
ensure => file,
require => Package[rabbitmq-server],
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/zulip/cron.d/rabbitmq-monitoring',
}
} }

View File

@ -0,0 +1,24 @@
# @summary Munin monitoring of a Django frontend and RabbitMQ server.
#
class zulip_ops::app_frontend_monitoring {
include zulip_ops::munin_node
$munin_plugins = [
'rabbitmq_connections',
'rabbitmq_consumers',
'rabbitmq_messages',
'rabbitmq_messages_unacknowledged',
'rabbitmq_messages_uncommitted',
'rabbitmq_queue_memory',
'zulip_send_receive_timing',
]
zulip_ops::munin_plugin { $munin_plugins: }
file { '/etc/cron.d/rabbitmq-monitoring':
ensure => file,
require => Package[rabbitmq-server],
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/zulip/cron.d/rabbitmq-monitoring',
}
}