-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 metric keda_scaler_active
never gets initialized
#4945
Comments
Hello!
You are right but there isn't any solution for that because CPU/Memory scalers are a wrapper over the k8s metrics server, so KEDA doesn't have those values because KEDA doesn't process them, it's the k8s metrics server who does it. Honestly, I think that KEDA shouldn't take the control over those resources because the metrics.k8s.io api is reserved for k8s metrics server and it exposes some metrics like container or resource, and KEDA doesn't support them. I mean, KEDA can't know the cpu metric value if KEDA doesn't expose it, but IMHO KEDA shouldn't expose it instead of the current k8s metrics server.
I think that we could do it, but there are some metrics attached to external resources for labeling, such as scaledobeject or scaledjobs, IDK if we can initialize them empty, but definitively KEDA should try to do something with them. |
Go it. But imho at least the dashboard should still work out of the box. Maybe by evaluating the metric
You mean that for those missing metrics also the labels must be intialized? An alternative could be to just initialize the Move keda/pkg/scaling/scale_handler.go Line 603 in 0386b17
keda/pkg/scaling/scale_handler.go Line 560 in 0386b17
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
I'm also seeing this issue and would love to get some help. |
Use a plain Horizontal Pod Autoscaler (HPA) dashboard for CPU/Memory based scaled objects. Or do it like me and fix the dashboard by using HPA metrics instead of KEDA metrics. I removed some KEDA specific panels and modified the rest. |
Can you share an example of such dashboard by any chance please? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed due to inactivity. |
This issue has been automatically closed due to inactivity. |
@JorTurFer Thanks for the response there. We were wondering if this is still a valid issue. We have been trying to utilize KEDA and while working on the dashboard stuff, we encountered this issue. If we create a If we dive into further, here is the func calls:
Happy to provide reproducible steps if requested. Could you please clarify in case if we're missing something obvious? /cc @yasinterol |
Hello, Maybe we should improve the docs about the metric to clarify that CPU and memory will never be included in those metrics that implies current values or errors (active implies the value too) |
Report
The provided Grafana Dashboard does not work because the required metric
keda_scaler_active
is not rendered on the /metrics endpoint. Therefore, the dashboard variables for the dropdown boxes cannot be evaluated correctly. The reason is that not all metrics are correctly initialized at bootstrapping time (first recording with default values). In addition, if you use ScaledObjects exclusively with CPU/memory triggers, the following metrics are not recorded at all:-
keda_scaler_active
-
keda_scaler_errors
-
keda_scaler_metrics_value
-
keda_scaler_metrics_latency
Expected Behavior
keda_scaler_active
keda_scaler_errors
keda_scaler_metrics_value
keda_scaler_metrics_latency
Actual Behavior
Metrics are missing if one is just using ScaledObjects with CPU/Memory triggers only
Steps to Reproduce the Problem
Logs from KEDA operator
No response
KEDA Version
2.11.2
Kubernetes Version
1.25
Platform
Microsoft Azure
Scaler Details
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: