Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Add the number of ML nodes to the ML feature set usage info #33850

Closed
droberts195 opened this issue Sep 19, 2018 · 2 comments
Closed

[ML] Add the number of ML nodes to the ML feature set usage info #33850

droberts195 opened this issue Sep 19, 2018 · 2 comments
Assignees
Labels

Comments

@droberts195
Copy link
Contributor

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;
            }
        }
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

@pickypg
Copy link
Member

pickypg commented Sep 19, 2018

/cc @chrisronline @ycombinator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants