How to monitor indices (doc count, size...)

It seems like a great way to manually check those metrics (index rate and so on) per index, which is actually pretty cool! However, I don't know how can that be used to alert. Is there a way to set thresholds to alert based on that metrics (Stack monitoring -> Indices -> -> Advanced)? Or maybe a way to access that information to process it with a ML job?
Thanks in advance!