gearman-exporter
gearman-exporter copied to clipboard
Add priority per function/queue metrics
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.
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 https://github.com/gearman/gearmand/issues/337 .
The gearadmin --priority-status
functionality has been fixed. The fix will be part o the 1.1.20 release https://github.com/gearman/gearmand/pull/338