diff --git a/app/vmselect/netstorage/tmp_blocks_file.go b/app/vmselect/netstorage/tmp_blocks_file.go index 7a278898f..947870023 100644 --- a/app/vmselect/netstorage/tmp_blocks_file.go +++ b/app/vmselect/netstorage/tmp_blocks_file.go @@ -85,7 +85,12 @@ func (addr tmpBlockAddr) String() string { return fmt.Sprintf("offset %d, size %d", addr.offset, addr.size) } -var tmpBlocksFilesCreated = metrics.NewCounter(`vm_tmp_blocks_files_created_total`) +var ( + tmpBlocksFilesCreated = metrics.NewCounter(`vm_tmp_blocks_files_created_total`) + _ = metrics.NewGauge(`vm_tmp_blocks_files_directory_free_bytes`, func() float64 { + return float64(fs.MustGetFreeSpace(tmpBlocksDir)) + }) +) // WriteBlockData writes b to tbf. //