message: Export metrics for idle connections
diff: @@ -164,6 +164,12 @@ IrcBridge.prototype._initialiseMetrics = function() {
  labels: ["server"]
  });
  + const idleConnections = metrics.addGauge({
  + name: "clientpool_idle_connections",
  + help: "Idle connections on the bridge, grouped into period buckets.",
  + labels: ["server", "period"]
  + });
  +
  const memberListLeaveQueue = metrics.addGauge({
  name: "user_leave_queue",
  help: "Number of leave requests queued up for virtual users on the bridge.",
  @@ -186,6 +192,11 @@ IrcBridge.prototype._initialiseMetrics = function() {
  reconnQueue.set({server: server.domain},
  this._clientPool.totalReconnectsWaiting(server.domain)
  );
  + this._clientPool.getIdleConnectionMetrics(server.domain).then((idleBuckets) => {
  + for (const bucket in idleBuckets) {
  + idleConnections.set({server: server.domain, period: bucket}, idleBuckets[bucket]);
  + }
  + });
  });
  Object.keys(this.memberListSyncers).forEach((server) => {
  