Closed kris-lab closed 8 years ago
@njam could you please give an initial look?
What information do we have in mysql? We can only see the number of "queued" jobs, not the number of "active" and "waiting" right?
For consistent naming I would then call the metrics jobs_queued_total_high
, jobs_queued_normal
and jobs_queued_low
?
Gearman/mysql:
mysql> describe gearman_queue;
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| unique_key | varchar(64) | YES | MUL | NULL | |
| function_name | varchar(255) | YES | | NULL | |
| priority | int(11) | YES | | NULL | |
| data | longblob | YES | | NULL | |
| when_to_run | int(11) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+
5 rows in set (0.00 sec)
active
and waiting
is the runtime information provided by gearman-api
. It is not kept persistence in the db.
@njam what about now? We could possibly make mysql
table name configurable as well.
lgtm
It's a pity that we will lose the ability to alert on "waiting" jobs (instead we'll alert on "queued" jobs jobs_queued_total_high
and jobs_queued_total_normal
), but I don't think there's a solution.
Part of https://github.com/cargomedia/bipbip/issues/168