private void addDataNodeToStateMetrics(final DataNode dataNode) {
    final String metricName = dataNode.getHostname() + "-" + dataNode.getPort() + "-ResourceState";
    Gauge<Long> dataNodeState = () -> dataNode.getState() == HardwareState.AVAILABLE ? 1L : 0L;
    registry.register(MetricRegistry.name(ClusterMap.class, metricName), dataNodeState);
    dataNodeStateList.add(dataNodeState);
  }
Metrics for the {@link StaticClusterManager}
@param hardwareLayout The {@link HardwareLayout} associated with the {@link StaticClusterManager}
@param partitionLayout The {@link PartitionLayout} associated with the {@link StaticClusterManager}
@param registry The {@link MetricRegistry} associated with the {@link StaticClusterManager}
ambry-clustermap/src/main/java/com/github/ambry/clustermap/ClusterMapMetrics.java