Applies to Anaconda Enterprise Notebooks Version 4
In a distributed multi node AEN installation, you may need to find how many projects are on each Compute Node to balance out the workload. You can find this information by querying MongoDB on the server.
1. First query to find the resource IDs of the Compute Nodes and number of projects:
mongo
use wakari
var results = db.projects.distinct("fr.resource_id")
results.forEach(function (id) {
... print(id, db.projects.find({"fr.resource_id" : id}).count() + " projects")
... })
2. Next query to find the Compute Node name and ID to compare the counts to the Compute's name:
db.fr.resources.find({}, {"name" : 1}).pretty()
With these results you can compare the ObjectId from the first query with the _id : ObjectId of the second query to get the Compute Node's name.
WARNING: Changing any of these values could result in a loss of projects that may not be recoverable.