-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compute: support using node
instead/above of instance
label
#262
Comments
Ref: #262. See #262 for the rationale, this PR implements straightfwd `s/instance/node/`, alternatively we could consider this to be optionally behind a flag, although increasing complexity for main to CSP modules coupling and test cases. Signed-off-by: JuanJo Ciarlante <[email protected]>
I'm hesitant about replacing the That being said, this does make sense as an optional config argument, as it can then be used for convenience for a big (and possibly majority) use-case: managed Kubernetes. I think this brings up an interesting point, since the
|
+1 moving away from |
Fixes #262. *## What Allow `instance` label name to be set via new `-compute.instance-label` flag. *## Why See #262 for the rationale and discussion. *## How * for each compute `Collector`, create new `collectorMetrics` type containing compute metrics (moved from _global var_), to let each `Collector` own an allocated instance obtained via `newCollectorMetrics(instanceLabel)` * changing metrics from _global var_ to dynamically allocated object is needed for: * setting its label at runtime * allowing tests to be self-contained, else the 1st test to run would "own" setting `instanceLabel` * there's a new `config.CommonConfig` type, currently only having a single field `ComputeInstanceLabel`, which is passed down from `cmd/` to each instantiated _Provider_, then to each compute _Collector_ *## Testing Adapted testing with a couple `ComputeInstanceLabel="node"` changes, although it should be improved to test changes to the label name. -- Signed-off-by: JuanJo Ciarlante <[email protected]>
I am opposed to having labels defined via command line arguments for the following reasons:
I'd really like for us to get alignment on what the root problem is that we're trying to address(In this case, |
It's not only easying promQL, it's actually decreasing the load into TSDB, for an arbitrary renaming that will likely be always needed (should we keep
(?) sure, as operator you could always shoot yourself in the foot, nevertheless top->down label setting currently only allows one entry point for it.
Didn't ever propose that -- it's this particular one I'm concerned, as we do know [*] we have disjoint sets of metrics (ec2, kube) that inevitably use either
Already replied in the very previous paragraph[*] |
Indeed, one aspect that I'll really like |
What
Either change compute modules'
instance
tonode
, or support e.g.--compute.vm-instance-label=LABEL_NAME
.Why
Couple main reasons:
cloudcost-exporter
metrics in Kubernetes, to be able to join againstkube_.*
metrics (likekube_node_labels
,kube_node_annotations
,kube_node_status_capacity
,kube_node_status_allocatable
, ... see full list below), you then are forced to relabelinstance
tonode
with a construct likeThe above needs to be done for every
<CSP>
you may run (especially the case if you have a centralized TSDB), note also that you need to visit every timeseries to perform this relabelling (under the context of TSDB pressure).cloudcost-exporter
already chosecluster_name
instead ofcluster
(this being a popular label_name choice, then avoiding the scrape-time rename toexported_cluster
), then why keepinginstance
that by design scraping agents will always rename toexported_instance
(thus the example relabelling query above).Appendix
Pasting the full list of Kubernetes metrics using
node
, from this querycount by (__name__)({__name__=~"kube_.+", node!=""})
The text was updated successfully, but these errors were encountered: