mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
feat(vmselect): add tmp block dir size metrics vm_tmp_blocks_files_size_total
(#527)
* feat(vmselect): add tmp block dir size metrics `vm_tmp_blocks_files_size_total` * refactor(vmselect): use free space instead of used space in tmp block file metrics * fix: add `bytes` suffix to tmp dir free space metric
This commit is contained in:
parent
89a922fb19
commit
fa103875a0
1 changed files with 6 additions and 1 deletions
|
@ -85,7 +85,12 @@ func (addr tmpBlockAddr) String() string {
|
||||||
return fmt.Sprintf("offset %d, size %d", addr.offset, addr.size)
|
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.
|
// WriteBlockData writes b to tbf.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue