KEDA - New Relic integration #5056
Unanswered
CerqueiraYYZ
asked this question in
Q&A / Need Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys I integrated Keda on my cluster and now I like to use it with New Relic queries. I did this script
`apiVersion: v1
kind: Secret
metadata:
name: new-relic-secret
namespace: booking-dev2
type: Opaque
data:
apiKey: YOUR_API_KEY_ENCODED
account: YOUR_ACCOUNT_ENCODED
region: YOUR_REGION_ENCODED
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-new-relic
namespace: booking-dev2
spec:
secretTargetRef:
name: new-relic-secret
key: apiKey
name: new-relic-secret
key: account
name: new-relic-secret
key: region
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: newrelic-scaledobject
namespace: booking-dev2
spec:
maxReplicaCount: 40
minReplicaCount: 1
pollingInterval: 120
cooldownPeriod: 200
advanced:
horizontalPodAutoscalerConfig:
behavior:
scaleDown:
policies:
- type: Pods
value: 1
periodSeconds: 100
- type: Percent
value: 5
periodSeconds: 100
stabilizationWindowSeconds: 300
scaleUp:
stabilizationWindowSeconds: 0
policies:
- type: Percent
value: 100
periodSeconds: 15
- type: Pods
value: 4
periodSeconds: 15
selectPolicy: Max
scaleTargetRef:
name: booking-deployment
triggers:
- type: new-relic
metadata:
nrql: "SELECT (count()/uniqueCount(podName))(average(duration))FROM Transaction WHERE appName='YOUR_APP_NAME' since 1 minute ago EXTRAPOLATE limit max"
noDataError: "false"
threshold: '80'
authenticationRef:
name: keda-trigger-auth-new-relic
- type: cpu
metricType: Utilization
metadata:
value: "60"
`
I saw really strange data from hpa for example.
keda-hpa-newrelic-scaledobject Deployment/booking-deployment 114351m/80 (avg), 64%/60% 1 40 2 27m
If I do the same query manually on New Relic I get 217.
I tried to understand it as a miliUnit doing 114351/1000 = 114.351 but the deviation is too big and the traffic is really stable.
Can you help me to understand a bit where this values are coming from. I dont see on the logs any errors.
Beta Was this translation helpful? Give feedback.
All reactions