Skip to content
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 in the operator are only exposed when the metrics server requests the metrics #4075

Closed
JorTurFer opened this issue Jan 5, 2023 · 8 comments · Fixed by #4115
Assignees
Labels
bug Something isn't working

Comments

@JorTurFer
Copy link
Member

JorTurFer commented Jan 5, 2023

Report

I have seen that metric keda_scaler_metrics_value is updated when the value is queried by the ms (and the same for keda_scaler_error_totals and keda_scaled_object_error_totals), I think that it makes sense to update the metric after GetMetricsAndActivity (inside GetScaledObjectState) because it has been read

KEDA Version

2.9.1

@JorTurFer JorTurFer added the bug Something isn't working label Jan 5, 2023
@JorTurFer JorTurFer assigned JorTurFer and zroubalik and unassigned JorTurFer Jan 5, 2023
@nunoadrego
Copy link

Is this related to the fact that apart from Metrics exposed by the Operator SDK, I only see keda_resource_totals and keda_trigger_totals metrics?

I was expecting to see keda_scaler_metrics_value, keda_scaler_errors, keda_scaler_error_totals and keda_scaled_object_error_totals, even if they were zero.

@zroubalik
Copy link
Member

Is this related to the fact that apart from Metrics exposed by the Operator SDK, I only see keda_resource_totals and keda_trigger_totals metrics?

I was expecting to see keda_scaler_metrics_value, keda_scaler_errors, keda_scaler_error_totals and keda_scaled_object_error_totals, even if they were zero.

So you don't see these values once you create a ScaledObject?

@nunoadrego
Copy link

nunoadrego commented Jan 16, 2023

I was able to see them after following this https://keda.sh/docs/2.9/operate/metrics-server/. Since most of the SOs only use CPU and Memory scalers, I read in another issue this is intended.

I can now see:

  • keda_resource_totals
  • keda_scaled_errors
  • keda_scaler_errors (don't appear in the docs or have a different name)
  • keda_scaler_metrics_value
  • keda_trigger_totals

Missing (according to docs):

  • keda_scaler_error_totals
  • keda_scaled_object_error_totals

The latest official Grafana dashboard depends on some of these metrics, in particular, keda_scaled_object_errors. What's the best approach to deal with this behavior?

@zroubalik
Copy link
Member

So the supported metrics are (for 2.9.1.)

keda_scaler_metrics_value
keda_scaler_errors
keda_scaler_error_totals
keda_scaled_object_errors     # due to a bug this is now reported as keda_scaled_errors, has been fixed already
keda_resource_totals
keda_trigger_totals

@zroubalik
Copy link
Member

We will most likely release 2.9.2 soon, this should also fix the exported metrics.

@zroubalik
Copy link
Member

We will most likely release 2.9.2 soon, this should also fix the exported metrics.

2.9.2 including fix this has been just released! :shipit:

@nunoadrego
Copy link

Will try it and provide feedback @zroubalik. Thanks!

@vmm-afonso
Copy link

Is this related to the fact that apart from Metrics exposed by the Operator SDK, I only see keda_resource_totals and keda_trigger_totals metrics?

I was expecting to see keda_scaler_metrics_value, keda_scaler_errors, keda_scaler_error_totals and keda_scaled_object_error_totals, even if they were zero.

Not sure if this was supposed to be fixed since I'm rolling with the latest release v.2.9.3 and I am having the same problem.
Captura de ecrã 2023-02-10 003749
This is what I'm getting

I was trying to get the grafana dashboard to work but as @nunoadrego pointed out, the dashboard depends on some of these metrics. I'm also unable to set some most of the variables for the dashboard apart from the data-source.

Any tips?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants