Mod Gearman - Worker (gearman_top)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dbcummings
Posts: 130
Joined: Thu Dec 13, 2018 8:37 am

Mod Gearman - Worker (gearman_top)

Post by dbcummings »

Hello,

We are deploying Mod Gearman. When we run gearman_top on our workers, we normally get:

Queue Name | Worker Available | Jobs Waiting | Jobs Running
---------------------------------------------------------------
no queues found
---------------------------------------------------------------

On one of our workers, we have:

Queue Name | Worker Available | Jobs Waiting | Jobs Running
-------------------------------------------------------------------------------------
eventhandler | 5 | 0 | 0
host | 5 | 0 | 0
notification | 5 | 0 | 0
service | 5 | 0 | 0
<workername> | 1 | 0 | 0
-------------------------------------------------------------------------------------

What is the expected behavior for gearman_top on a remote worker configuration?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Mod Gearman - Worker (gearman_top)

Post by tgriep »

Typically, when you run the gearman_top on a worker, you have to specify the hostname that is running the gearmand daemon to get the status of Workers, queues, etc..
gearman_top -H <hostname>[:port]

If you are not specifying the hostname with the command line option, then the gearman_top command gets the data from the gearmand daemon that is running on the localhost "worker".
I suspect that you have the gearmand daemon running on the one worker and it is configured and showing valid data.

The other worker has the gearmand daemon running but no queues defined that is why you receive the "no queues found".

Typically, on a worker only system, the gearmand daemon it not running and gearman_top will output this message which is normal.
"failed to connect to address localhost and port 4730: Connection refused"
Be sure to check out our Knowledgebase for helpful articles and solutions!
dbcummings
Posts: 130
Joined: Thu Dec 13, 2018 8:37 am

Re: Mod Gearman - Worker (gearman_top)

Post by dbcummings »

The gearmand service is running on each worker. It was installed like this OOTB. I assumed that it always installed and ran even when installing the worker. I check the module.conf files on each servers and neither have queues configured. The files are identical. Is there somewhere else I should be checking to see if queues are configured?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Mod Gearman - Worker (gearman_top)

Post by ssax »

You would check the worker.conf on the workers and the module.conf on your XI server in /etc/mod_gearman or /etc/mod_gearman2 depending on version.

@tgriep is correct, if running from worker you should call it like:

Code: Select all

gearman_top -H hostname:port
So it it does work without doing that you likely need to modify your worker.conf to point to the main XI server as the job server.

On the XI server, what does gearman_top show?
dbcummings
Posts: 130
Joined: Thu Dec 13, 2018 8:37 am

Re: Mod Gearman - Worker (gearman_top)

Post by dbcummings »

You may close this.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Mod Gearman - Worker (gearman_top)

Post by scottwilkerson »

dbcummings wrote:You may close this.
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked