How to know disk used % from a trigger

Have you tried the call suggested in the previous comment? What’s there that doesn’t answer your requirement? As explained, you’re sharing resources with other tenants, so many components (the Oplog, for example) cannot really be accounted for with a shared tier.

That wouldn’t work, as adding all documents’ sizes doesn’t take in account a few things; indexes, obviously, but also the fact that data size doesn’t necessarily match the storage size. The best bet, then, is to sum the storage size returned by the call we suggested for all the databases.