This was broken by the fact that "machines" now also contains removed/disabled machines.
OBRJWODJKFL7JBSBPZSGC4ATQN4VNF7ZVI5OH2UEVAO4HB73QCTAC
BZSJO2RML6TBWKVTZ4ERHQK6L3GQ6D2K6E36S4YWUGCHU4Z2W6LAC
DODOGD7MRCMRVGX23RPY2243WG54HCMCEZ6DCHOGID3GBQB66CXQC
gauge("hydra.queue.machines.total", scalar(keys %{$json->{machines}}));
gauge("hydra.queue.machines.total", scalar(grep { $_->{enabled} } (values %{$json->{machines}})));