satellite/{accounting, contact}: Remove periods and spaces from metrics.

Change-Id: I84179c2931293e3a1eb0ff8050416d25e481ce07
This commit is contained in:
Moby von Briesen 2020-12-02 17:17:59 -05:00 committed by Maximillian von Briesen
parent 13555f3983
commit d75e4be11f
3 changed files with 32 additions and 24 deletions

View File

@ -1,11 +1,18 @@
storj.io/storj/cmd/segment-reaper."zombie_segments" IntVal
storj.io/storj/satellite/accounting/tally."total.bytes" IntVal
storj.io/storj/satellite/accounting/tally."total.inline_bytes" IntVal
storj.io/storj/satellite/accounting/tally."total.inline_segments" IntVal
storj.io/storj/satellite/accounting/tally."total.objects" IntVal
storj.io/storj/satellite/accounting/tally."total.remote_bytes" IntVal
storj.io/storj/satellite/accounting/tally."total.remote_segments" IntVal
storj.io/storj/satellite/accounting/tally."total.segments" IntVal
storj.io/storj/satellite/accounting/tally."bucket_bytes" IntVal
storj.io/storj/satellite/accounting/tally."bucket_inline_bytes" IntVal
storj.io/storj/satellite/accounting/tally."bucket_inline_segments" IntVal
storj.io/storj/satellite/accounting/tally."bucket_objects" IntVal
storj.io/storj/satellite/accounting/tally."bucket_remote_bytes" IntVal
storj.io/storj/satellite/accounting/tally."bucket_remote_segments" IntVal
storj.io/storj/satellite/accounting/tally."bucket_segments" IntVal
storj.io/storj/satellite/accounting/tally."total_bytes" IntVal
storj.io/storj/satellite/accounting/tally."total_inline_bytes" IntVal
storj.io/storj/satellite/accounting/tally."total_inline_segments" IntVal
storj.io/storj/satellite/accounting/tally."total_objects" IntVal
storj.io/storj/satellite/accounting/tally."total_remote_bytes" IntVal
storj.io/storj/satellite/accounting/tally."total_remote_segments" IntVal
storj.io/storj/satellite/accounting/tally."total_segments" IntVal
storj.io/storj/satellite/audit."audit_contained_nodes" IntVal
storj.io/storj/satellite/audit."audit_contained_nodes_global" Meter
storj.io/storj/satellite/audit."audit_contained_percentage" FloatVal
@ -39,6 +46,8 @@ storj.io/storj/satellite/audit."reverify_total_in_segment" IntVal
storj.io/storj/satellite/audit."reverify_unknown" IntVal
storj.io/storj/satellite/audit."reverify_unknown_global" Meter
storj.io/storj/satellite/audit."verify_shares_downloaded_successfully" IntVal
storj.io/storj/satellite/contact."failed_dial" Event
storj.io/storj/satellite/contact."failed_ping_node" Event
storj.io/storj/satellite/gracefulexit."graceful_exit_fail_max_failures_percentage" Meter
storj.io/storj/satellite/gracefulexit."graceful_exit_fail_validation" Meter
storj.io/storj/satellite/gracefulexit."graceful_exit_final_bytes_transferred" IntVal

View File

@ -185,26 +185,25 @@ func (service *Service) Tally(ctx context.Context) (err error) {
if len(observer.Bucket) > 0 {
var total accounting.BucketTally
for _, bucket := range observer.Bucket {
monAccounting.IntVal("bucket.objects").Observe(bucket.ObjectCount)
monAccounting.IntVal("bucket_objects").Observe(bucket.ObjectCount) //mon:locked
monAccounting.IntVal("bucket_segments").Observe(bucket.Segments()) //mon:locked
monAccounting.IntVal("bucket_inline_segments").Observe(bucket.InlineSegments) //mon:locked
monAccounting.IntVal("bucket_remote_segments").Observe(bucket.RemoteSegments) //mon:locked
monAccounting.IntVal("bucket.segments").Observe(bucket.Segments())
monAccounting.IntVal("bucket.inline_segments").Observe(bucket.InlineSegments)
monAccounting.IntVal("bucket.remote_segments").Observe(bucket.RemoteSegments)
monAccounting.IntVal("bucket.bytes").Observe(bucket.Bytes())
monAccounting.IntVal("bucket.inline_bytes").Observe(bucket.InlineBytes)
monAccounting.IntVal("bucket.remote_bytes").Observe(bucket.RemoteBytes)
monAccounting.IntVal("bucket_bytes").Observe(bucket.Bytes()) //mon:locked
monAccounting.IntVal("bucket_inline_bytes").Observe(bucket.InlineBytes) //mon:locked
monAccounting.IntVal("bucket_remote_bytes").Observe(bucket.RemoteBytes) //mon:locked
total.Combine(bucket)
}
monAccounting.IntVal("total.objects").Observe(total.ObjectCount) //mon:locked
monAccounting.IntVal("total_objects").Observe(total.ObjectCount) //mon:locked
monAccounting.IntVal("total.segments").Observe(total.Segments()) //mon:locked
monAccounting.IntVal("total.inline_segments").Observe(total.InlineSegments) //mon:locked
monAccounting.IntVal("total.remote_segments").Observe(total.RemoteSegments) //mon:locked
monAccounting.IntVal("total_segments").Observe(total.Segments()) //mon:locked
monAccounting.IntVal("total_inline_segments").Observe(total.InlineSegments) //mon:locked
monAccounting.IntVal("total_remote_segments").Observe(total.RemoteSegments) //mon:locked
monAccounting.IntVal("total.bytes").Observe(total.Bytes()) //mon:locked
monAccounting.IntVal("total.inline_bytes").Observe(total.InlineBytes) //mon:locked
monAccounting.IntVal("total.remote_bytes").Observe(total.RemoteBytes) //mon:locked
monAccounting.IntVal("total_bytes").Observe(total.Bytes()) //mon:locked
monAccounting.IntVal("total_inline_bytes").Observe(total.InlineBytes) //mon:locked
monAccounting.IntVal("total_remote_bytes").Observe(total.RemoteBytes) //mon:locked
}
// return errors if something went wrong.

View File

@ -83,7 +83,7 @@ func (service *Service) PingBack(ctx context.Context, nodeurl storj.NodeURL) (_
// If there is an error from trying to dial and ping the node, return that error as
// pingErrorMessage and not as the err. We want to use this info to update
// node contact info and do not want to terminate execution by returning an err
mon.Event("failed dial")
mon.Event("failed_dial") //mon:locked
pingNodeSuccess = false
pingErrorMessage = fmt.Sprintf("failed to dial storage node (ID: %s) at address %s: %q",
nodeurl.ID, nodeurl.Address, err,
@ -97,7 +97,7 @@ func (service *Service) PingBack(ctx context.Context, nodeurl storj.NodeURL) (_
_, err = client.pingNode(ctx, &pb.ContactPingRequest{})
if err != nil {
mon.Event("failed ping node")
mon.Event("failed_ping_node") //mon:locked
pingNodeSuccess = false
pingErrorMessage = fmt.Sprintf("failed to ping storage node, your node indicated error code: %d, %q", rpcstatus.Code(err), err)
service.log.Debug("pingBack pingNode error",