using PROMQL with GCP STACKDRIVER #6439
-
Hi community, I am able to run the example query in gcp metric explorer with PROMQL
I want to add this promql to scaler object like this apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: celery-worker
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: celery-worker
minReplicaCount: 1
maxReplicaCount: 30
advanced:
horizontalPodAutoscalerConfig:
behavior:
scaleDown:
stabilizationWindowSeconds: 180
triggers:
- type: cpu
metadata:
type: Utilization
value: "75"
- type: memory
metadata:
type: Utilization
value: "70"
- type: gcp-stackdriver
authenticationRef:
name: keda-trigger-auth-gcp-credentials
metadata:
projectId: xxx
metricName: "queue_pressure"
filter: |
sum(
rabbitmq_queue_messages{vhost="example", queue!~"^(celeryev\\..*|.*\\.pidbox)$"}
+ rabbitmq_queue_messages_unacked{vhost="example", queue!~"^(celeryev\\..*|.*\\.pidbox)$"}
)
/
sum(
rabbitmq_queue_consumers{vhost="example", queue="celery"}
)
targetValue: "3500"
alignmentPeriod: "60s"
queryWindow: "5m" But I got the following error: Warning KEDAScalerFailed 32m (x2 over 32m) keda-operator rpc error: code = InvalidArgument desc = Field filter had an invalid value of "sum(
skip the flowing line... How can i construct such PROMQL with GCP metrics? or it's not possible now? |
Beta Was this translation helpful? Give feedback.
Answered by
polo871209
Dec 28, 2024
Replies: 1 comment
-
I some how missed this part of doc, https://keda.sh/docs/2.13/scalers/prometheus/#google-managed-service-for-prometheus |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
polo871209
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I some how missed this part of doc,
https://keda.sh/docs/2.13/scalers/prometheus/#google-managed-service-for-prometheus