-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
Description
Currently the ML usage info contains details of how many jobs and datafeeds are created/running, but not the most basic statistic of how many ML nodes are in the cluster.
It should be pretty easy to add this to the MachineLearningFeatureSetUsage class. Then the MachineLearningFeatureSet.execute() method can populate it by iterating the discovery nodes in the cluster state and looking for the ml.enabled attribute (which basically propagates each node's node.ml setting to the other nodes).
Something like:
int mlNodeCount = 0;
for (DiscoveryNode node : clusterState.getNodes()) {
Map<String, String> nodeAttributes = node.getAttributes();
String enabled = nodeAttributes.get(MachineLearning.ML_ENABLED_NODE_ATTR);
if (Boolean.parseBoolean(enabled)) {
++mlNodeCount;
}
}