diff --git a/puppet/zulip/files/cron.d/rabbitmq-queuesize b/puppet/zulip/files/cron.d/rabbitmq-monitoring similarity index 92% rename from puppet/zulip/files/cron.d/rabbitmq-queuesize rename to puppet/zulip/files/cron.d/rabbitmq-monitoring index ec56f47cbfe03..6de866fe2ee3b 100644 --- a/puppet/zulip/files/cron.d/rabbitmq-queuesize +++ b/puppet/zulip/files/cron.d/rabbitmq-monitoring @@ -23,3 +23,4 @@ SHELL=/bin/bash * * * * * root /home/zulip/deployments/current/scripts/nagios/check-rabbitmq-queue &> /var/lib/nagios_state/check-rabbitmq-results-tmp; mv /var/lib/nagios_state/check-rabbitmq-results-tmp /var/lib/nagios_state/check-rabbitmq-results +* * * * * root /home/zulip/deployments/current/scripts/nagios/check-rabbitmq-consumers diff --git a/puppet/zulip/files/cron.d/rabbitmq-numconsumers b/puppet/zulip/files/cron.d/rabbitmq-numconsumers deleted file mode 100644 index b9cb5e72ab2c8..0000000000000 --- a/puppet/zulip/files/cron.d/rabbitmq-numconsumers +++ /dev/null @@ -1,5 +0,0 @@ -SHELL=/bin/bash -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -USER=root - -* * * * * root /home/zulip/deployments/current/scripts/nagios/check-rabbitmq-consumers diff --git a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_rabbitmq_consumers b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_rabbitmq_consumers index c1be7abb78bd6..b961b3cc3d458 100755 --- a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_rabbitmq_consumers +++ b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_rabbitmq_consumers @@ -6,7 +6,7 @@ Nagios plugin to check that the rabbitmq has the correct number of consumers. This script just checks the contents of /var/lib/nagios_state/check-rabbitmq-consumers, which is generated by scripts/nagios/check-rabbitmq-consumers. -It is run by cron and can be found at puppet/zulip/files/cron.d/rabbitmq-numconsumers +It is run by cron and can be found at puppet/zulip/files/cron.d/rabbitmq-monitoring """ import sys diff --git a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_rabbitmq_queues b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_rabbitmq_queues index 14d49c3c1b430..587ad906f190e 100755 --- a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_rabbitmq_queues +++ b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_rabbitmq_queues @@ -7,7 +7,7 @@ of a stuck consumer. This script just checks the contents of /var/lib/nagios_state/check-rabbitmq-results, which is generated by scripts/nagios/check-rabbitmq-queue. -It is run by cron; the crontab is in puppet/zulip/files/cron.d/rabbitmq-queuesize. +It is run by cron; the crontab is in puppet/zulip/files/cron.d/rabbitmq-monitoring """ import sys diff --git a/puppet/zulip/manifests/rabbit.pp b/puppet/zulip/manifests/rabbit.pp index 9aac948c71396..8c4c6fe62acfd 100644 --- a/puppet/zulip/manifests/rabbit.pp +++ b/puppet/zulip/manifests/rabbit.pp @@ -9,21 +9,10 @@ ] package { $rabbit_packages: ensure => 'installed' } - file { '/etc/cron.d/rabbitmq-queuesize': - ensure => file, - require => Package[rabbitmq-server], - owner => 'root', - group => 'root', - mode => '0644', - source => 'puppet:///modules/zulip/cron.d/rabbitmq-queuesize', - } - file { '/etc/cron.d/rabbitmq-numconsumers': - ensure => file, - require => Package[rabbitmq-server], - owner => 'root', - group => 'root', - mode => '0644', - source => 'puppet:///modules/zulip/cron.d/rabbitmq-numconsumers', + # Removed 2020-09 in version 4.0; these lines can be removed in + # Zulip version 5.0 and later. + file { ['/etc/cron.d/rabbitmq-queuesize', '/etc/cron.d/rabbitmq-numconsumers']: + ensure => absent, } file { '/etc/default/rabbitmq-server': diff --git a/puppet/zulip_ops/manifests/app_frontend.pp b/puppet/zulip_ops/manifests/app_frontend.pp index 79ab6e9e5569a..0e5185a2212c6 100644 --- a/puppet/zulip_ops/manifests/app_frontend.pp +++ b/puppet/zulip_ops/manifests/app_frontend.pp @@ -80,4 +80,13 @@ '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', + } }