nagios: Switch `check_remote_arg_string` queue checks to consumer checks.

These style of checks just look for matching process names using
`check_remote_arg_string`, which dates to 8edbd64bb8.  These were
added because the original two (`missedmessage_emails` and
`slow_queries`) did not create consumers, instead polling for events.

Switch these to checking the queue consumer counts that the
`check-rabbitmq-consumers` check is already writing out.  Since the
`missedmessage_emails` was _already_ checked via the consumer check, a
duplicate is not added.
This commit is contained in:
Alex Vandiver 2022-06-13 17:27:20 -07:00 committed by Alex Vandiver
parent f48d543d9b
commit 2c90c7a010
2 changed files with 12 additions and 38 deletions

View File

@ -146,11 +146,6 @@ define command{
command_line /usr/lib/nagios/plugins/check_procs -w '$ARG1$' -c '$ARG2$' -k
}
define command {
command_name check_remote_arg_string
command_line /usr/lib/nagios/plugins/check_by_ssh -p 22 -l nagios -t 30 -i /var/lib/nagios/.ssh/id_ed25519 -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -a "$ARG1$" -w $ARG2$ -c $ARG3$'
}
define command {
command_name check_fts_update_log
command_line /usr/lib/nagios/plugins/check_by_ssh -l nagios -t 30 -i /var/lib/nagios/.ssh/id_ed25519 -H $HOSTADDRESS$ -C '/usr/local/bin/process_fts_updates --nagios-check'

View File

@ -425,48 +425,27 @@ define service {
}
define service {
use generic-service
service_description Check embedded_bots queue processor
hostgroup_name frontends
check_command check_remote_arg_string!manage.py process_queue --queue_name=embedded_bots!1:1!1:1
max_check_attempts 3
contact_groups admins
use rabbitmq-consumer-service
service_description Check RabbitMQ embedded_bots consumers
check_command check_rabbitmq_consumers!embedded_bots
}
define service {
use generic-service
service_description Check missedmessage_emails queue processor
hostgroup_name frontends
check_command check_remote_arg_string!manage.py process_queue --queue_name=missedmessage_emails!1:1!1:1
max_check_attempts 3
contact_groups admins
use rabbitmq-consumer-service
service_description Check RabbitMQ email_senders consumers
check_command check_rabbitmq_consumers!email_senders
}
define service {
use generic-service
service_description Check email_senders queue processor
hostgroup_name frontends
check_command check_remote_arg_string!manage.py process_queue --queue_name=email_senders!1:1!1:1
max_check_attempts 3
contact_groups admins
use rabbitmq-consumer-service
service_description Check RabbitMQ outgoing_webhooks consumers
check_command check_rabbitmq_consumers!outgoing_webhooks
}
define service {
use generic-service
service_description Check outgoing webhooks queue processor
hostgroup_name frontends
check_command check_remote_arg_string!manage.py process_queue --queue_name=outgoing_webhooks!1:1!1:1
max_check_attempts 3
contact_groups admins
}
define service {
use generic-service
service_description Check deferred_work queue processor
hostgroup_name frontends
check_command check_remote_arg_string!manage.py process_queue --queue_name=deferred_work!1:1!1:1
max_check_attempts 3
contact_groups admins
use rabbitmq-consumer-service
service_description Check RabbitMQ deferred_work consumers
check_command check_rabbitmq_consumers!deferred_work
}
define service {