lib/fs: export vm_nfs_pending_dirs_to_remove metric for monitoring the number of pending directories that couldn't be removed due to NFS lock

This commit is contained in:
Aliaksandr Valialkin 2020-08-06 15:30:59 +03:00
parent 8f16388428
commit 639b26b40c

View file

@ -39,7 +39,12 @@ func mustRemoveAll(path string, done func()) bool {
return false
}
var nfsDirRemoveFailedAttempts = metrics.NewCounter(`vm_nfs_dir_remove_failed_attempts_total`)
var (
nfsDirRemoveFailedAttempts = metrics.NewCounter(`vm_nfs_dir_remove_failed_attempts_total`)
_ = metrics.NewGauge(`vm_nfs_pending_dirs_to_remove`, func() float64 {
return float64(len(removeDirCh))
})
)
type removeDirWork struct {
path string