From 2b9bf7526d504d8893a631c2d269798b1fd572ad Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 27 Aug 2015 12:02:23 +0200 Subject: [PATCH] hydra-send-stats: Keep track of the number of machines --- src/script/hydra-send-stats | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/script/hydra-send-stats b/src/script/hydra-send-stats index d014bfe9..600405c5 100755 --- a/src/script/hydra-send-stats +++ b/src/script/hydra-send-stats @@ -48,6 +48,9 @@ sub sendQueueRunnerStats { gauge("hydra.queue.bytes_sent", $json->{bytesSent}); gauge("hydra.queue.bytes_received", $json->{bytesReceived}); + + gauge("hydra.queue.machines.total", scalar(keys %{$json->{machines}})); + gauge("hydra.queue.machines.in_use", scalar(grep { $_->{currentJobs} > 0 } (values %{$json->{machines}}))); } while (1) {