define command {
command_name check_mod_gearman
command_line $USER1$/check_gearman -H localhost -W 300 -C 400
}
define command {
command_name check_mod_gearman_worker_connection
command_line $USER1$/check_gearman -H localhost -q worker_$ARG1$ -s check
}
define command {
command_name check_gearmand
command_line $USER1$/check_procs -u gearman -C gearmand -c 1:1
}
# Gearman servers
define service {
use st_selfcheck
host_name monitor2.example.org,monitor5.example.org
service_description gearman job control server
check_command check_gearmand
notes Check if the "gearmand" process is running
}
# Mod gearman queues
define service {
use st_selfcheck
host_name monitor2.example.org,monitor5.example.org
service_description mod gearman queues
check_command check_mod_gearman
notes Check the if the number of jobs and the number of workers are not above some arbitrary number (TODO: needs tuning)
}
# Workers
define service {
use st_selfcheck
host_name monitor2.example.org
service_description mod_gearman_worker connection
check_command check_mod_gearman_worker_connection!monitor2
notes Check if the mod_gearman_worker is connected to the gearman job control server on the icinga node
}