You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is a good point (so when the metrics exporter is writing back pod and pod for one particular result) - thinking "out loud" we could combine this with, say, some other identifier (like if pod is a child of some other object).
If there is always a metric field name called name, we could do something like:
kube_pod_container_resource_limits{namespace="${namespace}",resource=~"cpu|memory"} by pod[metricName], unit, __name__.
That could be a confusing syntax though because it looks like pod has an attribute called metricName (as would pod.metricName.). I think this is one of those that requires a little more thought.
The alternative (less work, less awesome) would be to throw an error and then it would be up to the exporter and the caller to query the right things. And as it would be a new function, we wouldn't need to deal with breaking folks just yet as nobody could be using this syntax...some food for thought.
Proposal
If I am retrieving cadvisor metrics for containers, I currently get back lots of fields such as
Instead of sending that data over the wire, I propose a way to ask for these fields only.
I know with a query like this:
the result includes
a
andb
, which is great.But if we are doing a simpler query such as:
we get back all of the fields I mentioned above. In our particular use case, we only care for fields like
pod
,unit
, and__name__
.My proposal is that we can ask for only certain fields through a syntax such as the existing
by
field.If I want only
pod
,unit
and__name__
, my query would be:kube_pod_container_resource_limits{namespace="${namespace}",resource=~"cpu|memory"} by pod, unit, __name__
Questions
The text was updated successfully, but these errors were encountered: