You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If the returned Series is empty for one or more processedMetrics, add it as invalid
Not sure if that's the best approach since it could be misleading in a scenario when there is no traffic and a service isn't reporting any requests count, for example.
I'm using Keda's ScaledObject to scale using DatadogMetric object, and ScaledObject is also flagged as not ready because of this.
The text was updated successfully, but these errors were encountered:
qlikcoe
changed the title
DatadogMetric's status is invalid if the returned Series is empty
DatadogMetric's status is flagged as Invalid if the returned Series is empty
Apr 28, 2025
Thanks for opening this issue! We will investigate how we can better support this KEDA use case.
The behavior you’re describing is currently expected. We designed it this way to prevent invalid queries (for example, queries with typos) by detecting when a query doesn’t return any value.
We are considering adding a new option to the DatadogMetric object to allow results without values.
In the meantime, could you try wrapping your query in a default() function, like this: default(avg:system.cpu.idle{*}, 0)
This will cause the query to return a default value (0 in this example) when no data is available, ensuring the metric is always considered “valid.”
datadog-agent/pkg/util/kubernetes/autoscalers/datadogexternal.go
Line 190 in 21fe278
Not sure if that's the best approach since it could be misleading in a scenario when there is no traffic and a service isn't reporting any requests count, for example.
I'm using Keda's ScaledObject to scale using DatadogMetric object, and ScaledObject is also flagged as
not ready
because of this.The text was updated successfully, but these errors were encountered: