diff --git a/cmd/collectors/zapi/plugins/aggregate/aggregate.go b/cmd/collectors/zapi/plugins/aggregate/aggregate.go index 0a00dd61c..cc4105957 100644 --- a/cmd/collectors/zapi/plugins/aggregate/aggregate.go +++ b/cmd/collectors/zapi/plugins/aggregate/aggregate.go @@ -59,7 +59,7 @@ func (a *Aggregate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, er if err != nil { a.Logger.Error().Err(err).Msg("Failed to update footprint data") // clean the map in case of the error - aggrFootprintMap = make(map[string]map[string]string) + clear(aggrFootprintMap) } // update aggregate instance label with cloud stores info diff --git a/cmd/collectors/zapi/plugins/volume/volume.go b/cmd/collectors/zapi/plugins/volume/volume.go index 6fa2fd64d..ad9cc9b7b 100644 --- a/cmd/collectors/zapi/plugins/volume/volume.go +++ b/cmd/collectors/zapi/plugins/volume/volume.go @@ -100,7 +100,7 @@ func (v *Volume) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix, error if err != nil { v.Logger.Error().Err(err).Msg("Failed to update footprint data") // clean the map in case of the error - volumeFootprintMap = make(map[string]map[string]string) + clear(volumeFootprintMap) } // update volume instance labels