Change the location of couchbase stats_data dir

We have a 3-node Couchbase cluster installed in the location /opt/couchbase with date storage and index storage path pointing to /u02/couchbase/data . Couchbase is writing some stats data in the location /opt/couchbase/var/lib/couchbase/stats_data which is causing the consumption of a lot of space in the root directory.

Eventually, all the space in the root directory gets occupied by these stats hence, Couchbase is unable to service any further requests.

Is there any way that we can change the location of this stats_data directory to a custom location?

Any help is greatly appreciated.

@shweta_julur Have you tried changing that directory to a symbolic link to a directory on another storage device, or making that directory into the mount point of a storage device?

@Kevin.Cherkauer I will try the symbolic link approach however, want to know the what data this stats_data directory contains, what is the significance of this data?

@shweta_julur Searching the code I find stats_dir is used by Prometheus Monitoring to store snapshots for serving(?) or from(?) the /api/v1/admin/tsdb/snapshot REST endpoint. This code is owned by the Cluster Manager team – perhaps someone from that team can chime in with more detail.

Here is Couchbase’s documentation page for the Prometheus Monitoring feature: