Skip to content

Commit

Permalink
Try to fix spikes by forcing read if freeSizeBytes is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
pedropombeiro committed Feb 21, 2023
1 parent 5d76b28 commit 9f3c139
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/exporter/prometheus/volinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (e *promExporter) getSysInfoVolMetrics() ([]metric, error) {
for idx, v := range e.volumes {
e.status.Volumes = append(e.status.Volumes, v.description)

if expired {
if expired || v.freeSizeBytes == 0 {
freesizeStr, err := utils.ExecCommand(e.getsysinfo, "vol_freesize", v.index)
if err != nil {
return nil, err
Expand Down

0 comments on commit 9f3c139

Please sign in to comment.