-
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
feat: Dynatrace scaler #5685
feat: Dynatrace scaler #5685
Conversation
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: damas <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: damas <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: damas <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: damas <19289022+cyrilico@users.noreply.github.com>
/run-e2e dynatrace |
Please, rebase your branch @cyrilico , the e2e issue was related with some breaking changes in otel-collector which are already fixed in |
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
/run-e2e dynatrace |
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
/run-e2e dynatrace |
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
new changes, please rerun |
/run-e2e dynatrace |
Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
/run-e2e dynatrace |
@cyrilico I've merged 2 fixes to the e2e to trigger them again (you'll need to pull the changes :) ) |
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Appreciate the help @JorTurFer 🙏 What metrics are available in that page? The one I used is supposed to be a built-in, i.e., supported OOTB, so I'm curious as to what exactly is available in that dynatrace environment |
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Any news @JorTurFer ? 🙏 |
I have to apologize for not answering before, I've been involved on a huge working peak :( |
Thanks, I have noticed in the corporate instance I have access to that Dynatrace does take a minute (sometimes literally) to ingest a data point, so I believe that might be an interesting approach. I'll take a look at the Azure Monitor scaler and try to get some inspiration |
For instance, influx does it too: https://github.com/kedacore/keda/blob/main/tests/scalers/influxdb/influxdb_test.go#L106-L117 It sets the expected value within the query and just updating the ScaledObject you change the received value. And this is the Azure log analytics one (I said azure monitor worngly): https://github.com/kedacore/keda/blob/main/tests/scalers/azure/azure_log_analytics/azure_log_analytics_test.go#L113-L123 |
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
@JorTurFer couldn't find an exact map to replicate that mechanism in Dynatrace (other than potentially mocking the API calls, which would invalidate the connection testing part), so I've tried a configurable default value filter available in their query language spec; can we have another e2e test run? |
/run-e2e dynatrace |
Hello, |
Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl>
/run-e2e dynatrace |
@cyrilico , I've updated the e2e test to use custom metrics. We have the full control over them and they don't need the agent or any other service, just POST to ingest and KEDA will read them 😄 |
Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl>
/run-e2e dynatrace |
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.
LGTM! Thanks for the contribution! ❤️
PTAL @zroubalik
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 really great, there is one minor thing, do you think you can refactor the scaler metadata parsing (parseDynatraceMetadata()
)? We introduced a new simplified way of parsing, it would be great to include this change in this scaler. You can see details at #5797
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
done @zroubalik 👌 |
/run-e2e dynatrace |
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.
thanks @cyrilico !
Thank you, makes life easier now. Don't have to deploy Prometheus server additionally on each cluster. |
* Add first scaler version Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * small refactor for response validation Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Add 'from' property, rename host/token Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Add parsing tests Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * update changelog Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: damas <19289022+cyrilico@users.noreply.github.com> * Update values type to float64 Signed-off-by: damas <19289022+cyrilico@users.noreply.github.com> * Remove unnecessary conversion Signed-off-by: damas <19289022+cyrilico@users.noreply.github.com> * e2e tests Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Update dynatrace_test.go Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Fix bad templating for e2e tests Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Revert unnecessary (?) template variable change Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> * Update tests/scalers/dynatrace/dynatrace_test.go Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> * Do not allow token to be passed in scaledobject trigger Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Remove bad secret, tweak dynakube test config Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Rename property in response parsing Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Update tests/scalers/dynatrace/dynatrace_test.go Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> * use new operator secret, update template variable naming Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * forgotten correct variable definition Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * try default value in query for e2e tests Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * fix missing closing parenthesis, bad indenting Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> * Update e2e test to use custom metrics Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl> * Close the body to fix static checks Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl> * use declarative scaler config Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> --------- Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com> Signed-off-by: damas <19289022+cyrilico@users.noreply.github.com> Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl> Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Co-authored-by: Jorge Turrado <jorge.turrado@scrm.lidl> Signed-off-by: Jorge Turrado <jorge.turrado@scrm.lidl>
Add new scaler for interacting with Dynatrace and its Get Metric Data Points API
Checklist
Closes #2411
Relates to kedacore/keda-docs#1360