add metrics for hydra notifications.

This commit is contained in:
AmineChikhaoui 2018-06-12 13:00:39 +01:00
parent 99e6c19672
commit 298e99449b
No known key found for this signature in database
GPG key ID: C0C8C84C15BCCD1C

View file

@ -56,6 +56,12 @@ sub sendQueueRunnerStats {
gauge("hydra.queue.machines.total", scalar(grep { $_->{enabled} } (values %{$json->{machines}})));
gauge("hydra.queue.machines.in_use", scalar(grep { $_->{currentJobs} > 0 } (values %{$json->{machines}})));
gauge("hydra.queue.notification.time_avg_ms", $json->{nrNotificationTimeAvgMs});
gauge("hydra.queue.notification.time_ms", $json->{nrNotificationTimeMs});
gauge("hydra.queue.notification.done", $json->{nrNotificationsDone});
gauge("hydra.queue.notification.failed", $json->{nrNotificationsFailed});
gauge("hydra.queue.notification.in_progress", $json->{nrNotificationsInProgress});
gauge("hydra.queue.notification.pending", $json->{nrNotificationsPending});
}
while (1) {