-
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 <[email protected]>
Signed-off-by: cyrilico <[email protected]>
Signed-off-by: cyrilico <[email protected]>
Signed-off-by: cyrilico <[email protected]>
Signed-off-by: cyrilico <[email protected]>
Signed-off-by: damas <[email protected]>
Signed-off-by: damas <[email protected]>
Signed-off-by: damas <[email protected]>
Signed-off-by: damas <[email protected]>
Signed-off-by: cyrilico <[email protected]>
/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 <[email protected]>
/run-e2e dynatrace |
Co-authored-by: Jorge Turrado Ferrero <[email protected]> Signed-off-by: cyrilico <[email protected]>
Signed-off-by: cyrilico <[email protected]>
/run-e2e dynatrace |
Signed-off-by: cyrilico <[email protected]>
Signed-off-by: cyrilico <[email protected]>
new changes, please rerun |
/run-e2e dynatrace |
Signed-off-by: Jorge Turrado Ferrero <[email protected]>
/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 <[email protected]>
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 <[email protected]>
Signed-off-by: cyrilico <[email protected]>
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 <[email protected]>
Signed-off-by: cyrilico <[email protected]>
Signed-off-by: cyrilico <[email protected]>
@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 <[email protected]>
/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 <[email protected]>
/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 <[email protected]>
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 <[email protected]> * small refactor for response validation Signed-off-by: cyrilico <[email protected]> * Add 'from' property, rename host/token Signed-off-by: cyrilico <[email protected]> * Add parsing tests Signed-off-by: cyrilico <[email protected]> * update changelog Signed-off-by: cyrilico <[email protected]> * Update CHANGELOG.md Signed-off-by: damas <[email protected]> * Update values type to float64 Signed-off-by: damas <[email protected]> * Remove unnecessary conversion Signed-off-by: damas <[email protected]> * e2e tests Signed-off-by: cyrilico <[email protected]> * Apply suggestions from code review Co-authored-by: Jorge Turrado Ferrero <[email protected]> Signed-off-by: cyrilico <[email protected]> * Update dynatrace_test.go Signed-off-by: cyrilico <[email protected]> * Fix bad templating for e2e tests Signed-off-by: cyrilico <[email protected]> * Revert unnecessary (?) template variable change Signed-off-by: cyrilico <[email protected]> * Apply suggestions from code review Signed-off-by: Jorge Turrado Ferrero <[email protected]> * Update tests/scalers/dynatrace/dynatrace_test.go Signed-off-by: Jorge Turrado Ferrero <[email protected]> * Do not allow token to be passed in scaledobject trigger Signed-off-by: cyrilico <[email protected]> * Remove bad secret, tweak dynakube test config Signed-off-by: cyrilico <[email protected]> * Rename property in response parsing Signed-off-by: cyrilico <[email protected]> * Update tests/scalers/dynatrace/dynatrace_test.go Signed-off-by: Jorge Turrado Ferrero <[email protected]> * use new operator secret, update template variable naming Signed-off-by: cyrilico <[email protected]> * forgotten correct variable definition Signed-off-by: cyrilico <[email protected]> * try default value in query for e2e tests Signed-off-by: cyrilico <[email protected]> * fix missing closing parenthesis, bad indenting Signed-off-by: cyrilico <[email protected]> * Update e2e test to use custom metrics Signed-off-by: Jorge Turrado <[email protected]> * Close the body to fix static checks Signed-off-by: Jorge Turrado <[email protected]> * use declarative scaler config Signed-off-by: cyrilico <[email protected]> --------- Signed-off-by: cyrilico <[email protected]> Signed-off-by: damas <[email protected]> Signed-off-by: Jorge Turrado Ferrero <[email protected]> Signed-off-by: Jorge Turrado <[email protected]> Co-authored-by: Jorge Turrado Ferrero <[email protected]> Co-authored-by: Jorge Turrado <[email protected]> Signed-off-by: Jorge Turrado <[email protected]>
Add new scaler for interacting with Dynatrace and its Get Metric Data Points API
Checklist
Closes #2411
Relates to kedacore/keda-docs#1360