-
Notifications
You must be signed in to change notification settings - Fork 63
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
Prometheus metrics capture query was incorrect on OCPv4 #381
Prometheus metrics capture query was incorrect on OCPv4 #381
Conversation
The prometheus metrics capture option was building a query that didn't return any data: ``` Metrics missing: [ContainerNode(1)] [#<ManageIQ::Providers::Kubernetes::ContainerManager::ContainerNode:0x00005622f0cbab88> crc-dv9sm-master-0] No data in response ```
6279318
to
ebae628
Compare
@agrare will this work on OCPv3 as well? |
I'm not sure, it depends on when this changed on the openshift side. Was it while Prometheus was tech preview on v3.x? Then yes. If it was ok v4 then probably not. If we need to split this into v3 and v4 Prometheus modules that'll take some more time. |
@@ -44,7 +44,7 @@ def prometheus_options | |||
} | |||
end | |||
|
|||
def labels_to_s(labels, job = "kubernetes-cadvisor") | |||
def labels_to_s(labels, job = "kubelet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the source of all the differences - you're getting data from a different source.
There is definitely a cadvisor running in v4, but not sure about data. I'd like to look more into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm I don't see any service other than kubelet which provides node metrics e.g. id="/" and for e.g. pod / container metrics if I add namespace= kubelet is the only job I see.
Prefer to have v4 working first. Then we can add back v3 support, if needed. |
If different queries are necessary, it's likely possible to craft a PromQL query that will work with either data without Ruby changes. P.S. It's a shame there is no easy way to capture raw Prometheus data for tests and just evaluate varying PromQL on it. Then we could answer similar questions without a 3.11 cluster, and generally could test metrics better... |
Actually it looks like the If you know of a way to support both (all three?) of these that would be greatly appreciated |
@cben does this look good to merge to support v4 and we can look at getting v3 supported later, if needed? |
Sure, if you're good with that 👍 Prometheus on 3.x was tech preview, I don't know how much effort it's worth to keep it working. |
Tech preview indeed. And not something we support or plan to support.
…On Sun, Jun 7, 2020, 09:42 Beni Cherniavsky-Paskin ***@***.***> wrote:
Sure, if you're good with that 👍
Prometheus on 3.x was tech preview, I don't know how much effort it's
worth to keep it working.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#381 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGLGAIUMPG24ULAKWIWONDRVMZFTANCNFSM4NSZDVKA>
.
|
Prometheus metrics capture query was incorrect on OCPv4 (cherry picked from commit 0c9dc84)
Jansa backport details:
|
The prometheus metrics capture option was building a query that didn't return any data:
The query string that was being built was incorrect: pod_name instead of pod, container_name instead of container, and the wrong job.