Add storageUsage to the metricType enum - #115
Open
traviswu-bigstack wants to merge 1 commit into
Open
traviswu-bigstack wants to merge 1 commit into
traviswu-bigstack wants to merge 1 commit into
Conversation
Per-VM allocated storage, ranked like the other VM metrics. The CubeCOS
collector (cubecos#1449) writes it to telegraf; this exposes it on
/metrics/{metricType}/rank/vms.
Named storageUsage rather than diskUsage because diskUsage is already taken
by the host filesystem percentage, and this is per-VM bytes allocated in the
storage pool -- a different entity and a different unit.
Listed right after diskUsage in the enum, both prose descriptions and both
error examples, so every place the values appear stays in the same order.
Signed-off-by: Travis Wu <travis.wu@bigstack.co>
traviswu-bigstack
force-pushed
the
travis.wu/storage-usage-metric-type
branch
from
September 15, 2026 03:29
514191e to
162c669
Compare
traviswu-bigstack
marked this pull request as ready for review
September 16, 2026 06:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind feature
Which issue(s) this PR fixes?
Part of bigstack-oss/cubecos#1449. Companion to bigstack-oss/cubecos#1450 and the cube-cos-api change that implements the rank query.
What this PR does?
Adds
storageUsageto themetricTypeenum so/metrics/{metricType}/rank/vmsaccepts it. The CubeCOS collector writes per-VM allocated bytes to thetelegrafdatabase; cube-cos-api ranks it.Named
storageUsagerather thandiskUsagebecausediskUsageis already the host filesystem percentage — a different entity and a different unit.The value is listed immediately after
diskUsagein all four places it appears (enum, prose description, and the two 400-response examples) so the ordering stays consistent with the API's error string.Test results (optional)
Spec parses; the enum was exercised end to end against a live cluster through the implementing cube-cos-api build —
storageUsagereturns 8 ranked VMs where it previously answered400 bad request.