Monitor Celery services (Distributed task queue)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Monitor Celery services (Distributed task queue)

Post 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
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Monitor Celery services (Distributed task queue)

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitor Celery services (Distributed task queue)

Post 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
Former Nagios Employee
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Monitor Celery services (Distributed task queue)

Post by eloyd »

Whoops, I actually meant NRPE, and had a brain fart! :-)
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Monitor Celery services (Distributed task queue)

Post by dwhitfield »

@kaushalshriyan, does that answer your question?
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Monitor Celery services (Distributed task queue)

Post 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?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Monitor Celery services (Distributed task queue)

Post by dwhitfield »

Thanks @eloyd!
Locked