Page 1 of 1
Monitor Celery services (Distributed task queue)
Posted: Tue Jan 24, 2017 9:40 am
by kaushalshriyan
Hi,
I am running celeryd and celerybeat which is a distributed task queue
http://www.celeryproject.org/
[root@plugins]# /etc/init.d/celerybeat status
celery init v10.1.
Using configuration: /etc/default/celeryd
celerybeat (pid 26748) is up...
[root@plugins]# /etc/init.d/celeryd status
celery init v10.1.
Using config script: /etc/default/celeryd
celeryd (node celery) (pid 30446) is up...
[root@plugins]#
Is there a way to monitor if celeryd and celerybeat services are running or stopped or down using Nagios Plugin check_procs or any other way to monitor celery services?
Any help will be highly appreciable. Thanks in Advance.
Regards,
Kaushal
Re: Monitor Celery services (Distributed task queue)
Posted: Tue Jan 24, 2017 11:49 am
by eloyd
You can monitor any process you want non the box. It's not clear if Nagios is running on your celery box or not though, which will make a difference.
Assuming you're checking remote hosts, you'll want to run NRDP and have the remote box check for the existence of a running instance of whatever the appropriate process name is.
Re: Monitor Celery services (Distributed task queue)
Posted: Tue Jan 24, 2017 12:16 pm
by rkennedy
In addition to what @eloyd mentioned, you should be able to do so through NRPE.
Add this as a command in your nrpe.cfg on the client running celeryd / celereybeat (adjust as needed) -
Code: Select all
command[check_proccount]=/usr/local/nagios/libexec/check_procs -C httpd -w 5 -c 10
Then, from Nagios you can use NRPE to check it -
Code: Select all
[root@localhost libexec]# ./check_nrpe -H x.x.x.x -c check_proccount
PROCS WARNING: 8 processes with command name 'httpd' | procs=8;5;10;0;
Code: Select all
[root@localhost libexec]# ps -ef | grep httpd | grep -v grep
apache 996 30808 0 Jan19 ? 00:03:19 /usr/sbin/httpd
apache 12999 30808 0 Jan19 ? 00:02:53 /usr/sbin/httpd
apache 16578 30808 0 Jan15 ? 00:06:09 /usr/sbin/httpd
apache 28688 30808 0 Jan19 ? 00:03:26 /usr/sbin/httpd
apache 30726 30808 0 Jan19 ? 00:03:19 /usr/sbin/httpd
root 30808 1 0 2016 ? 00:01:37 /usr/sbin/httpd
apache 31513 30808 0 07:35 ? 00:00:06 /usr/sbin/httpd
apache 32089 30808 0 Jan15 ? 00:06:43 /usr/sbin/httpd
[root@localhost libexec]# ps -ef | grep httpd | grep -v grep | wc -l
8
Re: Monitor Celery services (Distributed task queue)
Posted: Tue Jan 24, 2017 12:19 pm
by eloyd
Whoops, I actually meant NRPE, and had a brain fart!

Re: Monitor Celery services (Distributed task queue)
Posted: Tue Jan 24, 2017 12:22 pm
by dwhitfield
@kaushalshriyan, does that answer your question?
Re: Monitor Celery services (Distributed task queue)
Posted: Fri Oct 06, 2017 10:49 am
by eloyd
Every now and then, I go back to see if any topics that I've responded to are still open. This one is. Has this been resolved, Kaushal?
Re: Monitor Celery services (Distributed task queue)
Posted: Fri Oct 06, 2017 1:52 pm
by dwhitfield