Unfortunately this cannot be automated via the Web Client or vCenter Scheduled Task - this is why the button is right there beside the Health check .
However it should be fairly trivial to automate this via RVC+PowerCLI:
and/or through a script calling the relevant API:
Or alternatively you could schedule a cron job via the vCSA to automatically run the RVC task at specific intervals.
If you wanted this to proactively rebalance before it reached the alert threshold of the Health alert (30%) you could also proactively run/schedule the RVC job at a lower than default variance % using the -v switch (takes decimal value, e.g. for 20% variance threshold "-v .2"), and of course it would be possible to run the rebalance operation at a faster rate (-r) for a shorter variation (-t).
Either way, the imbalanced alert is basically informational in nature and can safely be ignored (or even disabled) - clusters by their nature balance data out over time with activity, with the caveat that the cluster is well-sized (e.g. no 8TB vmdks when only 10TB raw per node) and not over-utilized (70-75% max).
What version of vSAN is in use here?
Later versions of vSAN have much more intelligent and practical component/Object placement algorithms and features.
Thank you very much for that answer.
You gave me a lot of good information
To be honest, i don't think we're going to develop anything to automate this process, but maybe in a futur release of vSAN we will be able to automate it / schedule it by simply clicking a button .
That would be awesome.
BTW, the infrastructure is a 4-Node HY vSAN 6.2 (normal Cluster).