GitHub user JensRantil opened a pull request: https://github.com/apache/couchdb/pull/124
Expose free disk space for databases and indexes Three use cases: * To easily hook up monitoring tools to a database. * To enable triggering compaction using an external source based on disk usage. * To make it make it easier for automatic replication/sharding orchestration mechanisms to make good decisions on how to balance/move data. The last of these use cases was what triggered me into coming up with this pull request. Counter arguments against this pull request (that I can come up with): * Security: One might not want to expose the available disk space to the internet. Do you think I should make this information hidable using an option? * Dependence on a(nother?) system call when checking status of databases and/or indexes. * This information can be extracted using mechanisms outside of CouchDB, such as `ssh machine df -h`. I'd love to hear your input. You can merge this pull request into a Git repository by running: $ git pull https://github.com/JensRantil/couchdb expose-free-space Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb/pull/124.patch ---- commit d842b7a8eb072df890aa63a91fe846cf60f77ed5 Author: Jens Rantil <jens.ran...@gmail.com> Date: 2013-12-27T22:04:59Z Moving `free_space` to `couch_util` module This is a preparatory commit to expose free disk space where databases and views resides. commit 1c1eb40856fa0d06348bfd2ec53d4c37b232566a Author: Jens Rantil <jens.ran...@gmail.com> Date: 2013-12-27T22:24:01Z Expose disk free for a database The availability is exposed through `/{db}`. commit 9f5c78a63d41d35e746d54b1774662cdd8f277e9 Author: Jens Rantil <jens.ran...@gmail.com> Date: 2013-12-27T22:30:58Z Expose disk free for database indexes This is done through `/{db}/_design/{ddoc}/_info`. ----