Skip to content
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

docs: Add transaction count example for newrelic scaler #1510

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions content/docs/2.17/scalers/new-relic.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ You can use `TriggerAuthentication` CRD to configure the authentication with a `

### Example

Autoscaling trigger based on transaction duration average metric:

```yaml
apiVersion: v1
kind: Secret
Expand Down Expand Up @@ -106,3 +108,53 @@ spec:
authenticationRef:
name: keda-trigger-auth-new-relic
```

Autoscaling trigger based on transaction count [rate](https://docs.newrelic.com/docs/nrql/using-nrql/rate-function/) metric:

```yaml
apiVersion: v1
kind: Secret
metadata:
name: new-relic-secret
namespace: my-project
type: Opaque
data:
apiKey: TlJBSy0xMjM0NTY3ODkwMTIzNDU2Nwo= # base64 encoding of the new relic api key NRAK-12345678901234567
account: MTIzNDU2 # base64 encoding of the new relic account number 123456
region: VVM= # base64 encoding of the new relic region US
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-new-relic
namespace: my-project
spec:
secretTargetRef:
- parameter: queryKey
name: new-relic-secret
key: apiKey
- parameter: account
name: new-relic-secret
key: account
- parameter: region
name: new-relic-secret
key: region
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: newrelic-scaledobject
namespace: keda
spec:
maxReplicaCount: 12
scaleTargetRef:
name: dummy
triggers:
- type: new-relic
metadata:
nrql: "SELECT rate(count(*), 10 SECOND) FROM Transaction WHERE appName='SITE' SINCE 1 MINUTE AGO"
noDataError: "true"
threshold: '300'
authenticationRef:
name: keda-trigger-auth-new-relic
```
Loading