cloudmesosmarathondcos

Marathon Ruby SDK to get the number of nodes


I am using Marathon Ruby SDK to get the number of nodes registered with the DC/OS cluster. But I am not getting any method which can return me the number of nodes registered with the cluster. Marathon SDK: https://www.rubydoc.info/gems/marathon-api/

Any idea how can I get the registered nodes? Thanks in advance.


Solution

  • Marathon has no idea how many nodes are registered since it does not need this inforamtion to perform its tasks.

    The only way to get number of registered nodes is via Mesos Master API :5050/slaves