hydra-send-stats: Keep track of the number of machines

This commit is contained in:
Eelco Dolstra 2015-08-27 12:02:23 +02:00
parent 68796b2762
commit 2b9bf7526d

View file

@ -48,6 +48,9 @@ sub sendQueueRunnerStats {
gauge("hydra.queue.bytes_sent", $json->{bytesSent}); gauge("hydra.queue.bytes_sent", $json->{bytesSent});
gauge("hydra.queue.bytes_received", $json->{bytesReceived}); 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) { while (1) {