storagenode: add bandwidth metrics (#3623)
* storagenode: add bandwidth metrics * remove unecessary metric
This commit is contained in:
parent
976881f72b
commit
2739771761
@ -63,3 +63,5 @@ storj.io/storj/satellite/satellitedb."audit_reputation_alpha" FloatVal
|
||||
storj.io/storj/satellite/satellitedb."audit_reputation_beta" FloatVal
|
||||
storj.io/storj/storagenode/contact."satellite_contact_request" Meter
|
||||
storj.io/storj/storagenode/gracefulexit."satellite_gracefulexit_request" Meter
|
||||
storj.io/storj/storagenode/monitor."allocated_bandwidth" IntVal
|
||||
storj.io/storj/storagenode/monitor."used_bandwidth" IntVal
|
||||
|
@ -197,5 +197,9 @@ func (service *Service) AvailableBandwidth(ctx context.Context) (_ int64, err er
|
||||
return 0, Error.Wrap(err)
|
||||
}
|
||||
allocatedBandwidth := service.allocatedBandwidth
|
||||
|
||||
mon.IntVal("allocated_bandwidth").Observe(allocatedBandwidth) //locked
|
||||
mon.IntVal("used_bandwidth").Observe(usage) //locked
|
||||
|
||||
return allocatedBandwidth - usage, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user