track collection size
I would like to be able to track the size of our collections (i.e. # of records, total disk size) over time. It would be ideal if there was an automated way to do this with Atlas, perhaps with Charts ?
5
votes
![](https://secure.gravatar.com/avatar/97748ed5667f2277f7aece7fb7be7fec?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Tapani commented
While it's not automated, you can get a point-in-time snapshot with collStats: https://www.mongodb.com/docs/manual/reference/operator/aggregation/collStats/
You could solve this over time by writing a scheduled trigger than takes a snapshot at the desired interval and stores it in a collection. Then it's a matter of creating a Charts view of that collection.