Feature #14285
closed[keep-balance] metrics endpoint
Added by Tom Clegg about 6 years ago. Updated about 6 years ago.
Description
Export the current storage status (currently being logged as formatted text) as prometheus metrics.
Updated by Tom Clegg about 6 years ago
- Target version set to 2018-10-17 sprint
- Story points set to 1.0
Updated by Tom Clegg about 6 years ago
- changes logging format to JSON (was timestamped plaintext)
- adds backend storage metrics: keep_{garbage,lost,overreplicated,total,transient,underreplicated}_{blocks,bytes,replicas}
- adds keep-balance timing metrics: keepbalance_{changeset_compute,get_state,send_pull_list,send_trash_lists,sweep}_seconds
- updates doc page
TODO: require management token
Updated by Lucas Di Pentima about 6 years ago
Should the ‘Listen’ config param be added to usage.go
? The rest lgtm.
Updated by Tom Clegg about 6 years ago
Metrics endpoints for keepstore, keep-web, keep-balance now require ManagementToken, if one is configured.
Added Listen and ManagementToken to usage.go.
14285-keep-balance-metrics @ 1f7a87ea4c342d16e0992872e2893cb6a2da92e9 https://ci.curoverse.com/view/Developer/job/developer-run-tests/928/
Updated by Tom Clegg about 6 years ago
14285-keep-balance-metrics @ 2e50177344ad50dc5d6c599445c272e200636af8 https://ci.curoverse.com/view/Developer/job/developer-run-tests/929/
Fixes failing sdk/go/health test.
Updated by Lucas Di Pentima about 6 years ago
A couple of questions:
- I’m not understanding how
LoadToken()
comes into play with the rest of the code, it seems to not being called from anywhere, could you please explain? - Is
sdk/go/auth
getting big enough to deserve some testing?
Updated by Tom Clegg about 6 years ago
Lucas Di Pentima wrote:
A couple of questions:
- I’m not understanding how
LoadToken()
comes into play with the rest of the code, it seems to not being called from anywhere, could you please explain?
It's a middleware that attaches a *Credentials to the request, for CredentialsFromRequest can return when called (perhaps repeatedly) by inner handlers. The most likely use for it is in controller, but not until it gets cleaned up a bit.
- Is
sdk/go/auth
getting big enough to deserve some testing?
Yes, added some handler tests. There's room for more, but how far should we go?
14285-keep-balance-metrics @ 7ad5d87a9e2d67224ed440c9320f1850cbaf6ae1
Updated by Lucas Di Pentima about 6 years ago
Thanks for the explanation, I had the suspicion that it was for future use.
This LGTM, please merge.
Updated by Tom Clegg about 6 years ago
- adds arvados_keep_dedup_block_ratio and ..._byte_ratio metrics
- rough measure of storage cost savings as a result of content addressing
- ratio=2.0 would mean the average block is referenced by two collections
Updated by Lucas Di Pentima about 6 years ago
Just one question: Would it be convenient to use uin64
instead of int64
on collectionB.+s
vars?
The rest LGTM.
Updated by Tom Clegg about 6 years ago
Lucas Di Pentima wrote:
Just one question: Would it be convenient to use
uin64
instead ofint64
oncollectionB.+s
vars?
I'm inclined to use signed ints anywhere arithmetic might be done -- uints have weird properties like 0-1 > 0 that can produce subtle bugs later on.
Updated by Tom Clegg about 6 years ago
- Status changed from In Progress to Resolved
Applied in changeset arvados|0afa17181a2bd003a50ec5d1705533b84b02ad2c.