Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add priority per function/queue metrics #26

Open
octavn opened this issue May 26, 2022 · 2 comments
Open

Add priority per function/queue metrics #26

octavn opened this issue May 26, 2022 · 2 comments

Comments

@octavn
Copy link

octavn commented May 26, 2022

There's a gearadmin --priority-status command which gives us the number of jobs per priority in each queue/function:

[octavn@s4-dev ~]$ gearadmin --priority-status
convert	0	0	0	35

The output contains the following data :

function_name HIGH  NORMAL LOW worker_count

The command reads the info from the prioritystatus command you can use once you telnet to the gearmand service via port 4730 . So same source of info as other metrics in this exporter.

This feature shows up in the 1.1.19.1 release ChangeLog file as having been added in release 1.1.15 from 2017 :

tag: 1.1.15 - 2017-02-17 Fix comparison of pointer and bool
 - 2016-12-26 Fix specfile for renamed README
 - 2016-12-26 Update readme md (#66)
 - 2016-12-14 remove gearmand text command shutdown (#40)
 - 2016-12-14 Fixed typo (jon_queued -> job_queued)
 - 2016-12-14 Added "prioritystatus" command to display queued jobs broken down by priority.
...

This is very useful if you have thousands of jobs waiting to be processed in various priorities. With these metrics we'll be able to monitor in Grafana the structure of the queue, how each priority stacks on top of each other and estimate when HIGH priority jobs will finish > NORMAL priority jobs start.

@octavn
Copy link
Author

octavn commented May 26, 2022

However, from our recent experience, the gearadmin --priority-status functionality seems to be bugged as it does not return the expected values for each priority. I've opened a ticked for this bug with the Gearman repo gearman/gearmand#337 .

@octavn
Copy link
Author

octavn commented Jun 2, 2022

The gearadmin --priority-status functionality has been fixed. The fix will be part o the 1.1.20 release gearman/gearmand#338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant