Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2840#discussion_r218484299
--- Diff:
storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java ---
@@ -2922,19 +2948,20 @@ public void launchServer() throws Exception {
}
});
- metricsRegistry.registerGauge("nimbus:num-supervisors", () ->
state.supervisors(null).size());
- metricsRegistry.registerGauge("nimbus:fragmented-memory",
this::fragmentedMemory);
- metricsRegistry.registerGauge("nimbus:fragmented-cpu",
this::fragmentedCpu);
- metricsRegistry.registerGauge("nimbus:available-memory", () ->
nodeIdToResources.get().values().parallelStream()
- .mapToDouble(SupervisorResources::getAvailableMem)
+
metricsRegistry.registerGauge("nimbus:total-available-memory-non-negative", ()
-> nodeIdToResources.get().values()
--- End diff --
There appears to be some oddness with the naming of the metrics. It would
be nice to have some kind of convention for them.
Perhaps we can have something like
* 'nimbus:cluster:available-memory-mb' to show that this came from nimbus,
it is about the cluster and it is the available memory in MB.
* 'nimbus:cluster:available-cpu-pct'
* 'nimbus:cluster:total-memory-mb'
* 'nimbus:cluster:total-cpu-pct'
etc.
---