-
Notifications
You must be signed in to change notification settings - Fork 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
base: main
Are you sure you want to change the base?
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>
5cb822c
to
4e3d039
Compare
/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 |
Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
/run-e2e dynatrace |
/run-e2e dynatrace |
It seems that the query isn't correct. Checking the logs I see lines like this: 2024-04-28T22:27:24Z ERROR dynatrace_scaler error executing Dynatrace query {"type": "ScaledObject", "namespace": "dynatrace-test-ns", "name": "dynatrace-test-so", "error": "dynatrace response does not contain any results"} |
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
88d88d3
to
f27579c
Compare
Signed-off-by: cyrilico <19289022+cyrilico@users.noreply.github.com>
I misnamed a response property name which must have caused the inability to correctly parse it, not sure where I got the original from, probably misread; the query itself is pretty generic, should always return something |
/run-e2e dynatrace |
2024-04-29T19:24:29.2272752Z === RUN TestDynatraceScaler
2024-04-29T19:24:29.2276455Z dynatrace_test.go:***9: --- setting up ---
2024-04-29T19:24:29.2280365Z helper.go:***48: deleting namespace dynatrace-test-ns
2024-04-29T19:24:29.2299743Z helper.go:***0***: waiting for namespace dynatrace-test-ns deletion
2024-04-29T19:24:29.2304187Z helper.go:***5: Creating namespace - dynatrace-test-ns
2024-04-29T19:24:29.2308107Z helper.go:550: Applying template: secretTemplate
2024-04-29T19:24:29.2312194Z helper.go:550: Applying template: triggerAuthenticationTemplate
2024-04-29T19:24:29.2316268Z helper.go:550: Applying template: serviceTemplate
2024-04-29T19:24:29.2320314Z helper.go:550: Applying template: monitoredDeploymentTemplate
2024-04-29T19:24:29.2323148Z helper.go:550: Applying template: deploymentTemplate
2024-04-29T19:24:29.2325160Z helper.go:550: Applying template: scaledObjectTemplate
2024-04-29T19:24:29.2327143Z helper.go:550: Applying template: dynakubeTemplate
2024-04-29T19:24:29.2328861Z helper.go:564:
2024-04-29T19:24:29.2330976Z Error Trace: /__w/keda/keda/tests/helper/helper.go:564
2024-04-29T19:24:29.2333355Z /__w/keda/keda/tests/helper/helper.go:59***
2024-04-29T19:24:29.2335864Z /__w/keda/keda/tests/scalers/dynatrace/dynatrace_test.go:***46
2024-04-29T19:24:29.2338330Z Error: Received unexpected error:
2024-04-29T19:24:29.2340662Z error: error when retrieving current configuration of:
2024-04-29T19:24:29.2343670Z Resource: "dynatrace.com/v***beta***, Resource=dynakubes", GroupVersionKind: "dynatrace.com/v***beta***, Kind=DynaKube"
2024-04-29T19:24:29.2346580Z Name: "", Namespace: "default"
2024-04-29T19:24:29.2349146Z from server for: "/tmp/dynakubeTemplate***6***97***5***": resource name may not be empty
2024-04-29T19:24:29.2351676Z Test: TestDynatraceScaler
2024-04-29T19:24:29.2354391Z Messages: cannot apply file - error: error when retrieving current configuration of:
2024-04-29T19:24:29.2357696Z Resource: "dynatrace.com/v***beta***, Resource=dynakubes", GroupVersionKind: "dynatrace.com/v***beta***, Kind=DynaKube"
2024-04-29T19:24:29.2360534Z Name: "", Namespace: "default"
2024-04-29T19:24:29.2370269Z from server for: "/tmp/dynakubeTemplate***6***97***5***": resource name may not be empty
2024-04-29T19:24:29.2373656Z helper.go:444: Waiting for deployment replicas to hit target. Deployment - dynatrace-test-deployment, Current - 0, Target - 0
2024-04-29T19:24:29.2376385Z dynatrace_test.go:***58: --- testing activation --- |
Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
/run-e2e dynatrace |
Same result:
Is this metric correct? |
@JorTurFer I am certain the query should return a valid result. Is the host variable still using the |
I've been on a business trip this week, but let me check out your branch and check the current code using the current secrets |
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>
0d1d32b
to
fb5ce7b
Compare
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 |
Add new scaler for interacting with Dynatrace and its Get Metric Data Points API
Checklist
Closes #2411
Relates to kedacore/keda-docs#1360