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

Custom HPA metric names #5925

Closed
pznamensky opened this issue Jun 28, 2024 · 4 comments
Closed

Custom HPA metric names #5925

pznamensky opened this issue Jun 28, 2024 · 4 comments
Labels
feature-request All issues for new features that have not been committed to needs-discussion stale All issues that are marked as stale due to inactivity

Comments

@pznamensky
Copy link

Proposal

Currently, KEDA creates HPA with auto-generated metric names (i.e s0-prometheus).
Though we can customise a trigger name via trigger.name, metric name cannot be changed.
Usually that's not a problem, but in our case it's a bit confusing.
We usually use multiple triggers for our apps.
To understand what causes scaling up, we used to plot these two prometheus metrics from hpa:

  • kube_horizontalpodautoscaler_status_target_metric
  • kube_horizontalpodautoscaler_spec_target_metric

or target & hpa spec values.

This is a convenient method to understand what's going on with HPA and what hpa.spec.metrics should be tuned.
However, as hpa.spec.metrics from KEDA are auto-generated, it's not as straightforward anymore.

Fortunately, KEDA has keda_scaler_metrics_value that shows the current value of a metric in a trigger.
As we can specify trigger.name, we could use this metric, but there is no corresponding keda_scaler_metrics_target to compare with.

So, from my perspective, there could be two possible solutions on how to add more visibility:

  • add the ability to somehow customise hpa.spec.metrics names (i.e. by adding a custom prefix or postfix to it, or use trigger.name as prefix/postfix)
  • add prometheus metric keda_scaler_metrics_target to get be able to compare it with keda_scaler_metrics_value

How does that sound to you?

Use-Case

No response

Is this a feature you are interested in implementing yourself?

No

Anything else?

No response

@pznamensky pznamensky added feature-request All issues for new features that have not been committed to needs-discussion labels Jun 28, 2024
Copy link

stale bot commented Aug 27, 2024

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.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Aug 27, 2024
Copy link

stale bot commented Sep 5, 2024

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Sep 5, 2024
@guicholeo
Copy link

I'm also interested in this. We would want the metric name in the HPA for Prometheus to pick up.

@pznamensky
Copy link
Author

pznamensky commented Sep 26, 2024

It seems we need to create a new issue, as stale bot has already closed this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to needs-discussion stale All issues that are marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants