Skip to content

Commit 563b1cd

Browse files
author
Filip Petkovski
committed
Add New Relic provider to the documentation
1 parent c81e19c commit 563b1cd

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

docs/gitbook/usage/metrics.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,3 +314,56 @@ Reference the template in the canary analysis:
314314
```
315315

316316
**Note** that Flagger need AWS IAM permission to perform `cloudwatch:GetMetricData` to use this provider.
317+
318+
### New Relic
319+
320+
You can create custom metric checks using the New Relic provider.
321+
322+
Create a secret with your New Relic Insights credentials:
323+
324+
```yaml
325+
apiVersion: v1
326+
kind: Secret
327+
metadata:
328+
name: newrelic
329+
namespace: istio-system
330+
data:
331+
newrelic_account_id: your-account-id
332+
newrelic_query_key: your-insights-query-key
333+
```
334+
335+
New Relic template example:
336+
337+
```yaml
338+
apiVersion: flagger.app/v1beta1
339+
kind: MetricTemplate
340+
metadata:
341+
name: newrelic-error-rate
342+
namespace: istio-system
343+
spec:
344+
provider:
345+
type: newrelic
346+
secretRef:
347+
name: newrelic
348+
query: |
349+
SELECT
350+
filter(sum(nginx_ingress_controller_requests), WHERE status >= '500') /
351+
sum(nginx_ingress_controller_requests) * 100
352+
FROM Metric
353+
WHERE metricName = 'nginx_ingress_controller_requests'
354+
AND ingress = '{{ ingress }}' AND namespace = '{{ namespace }}'
355+
```
356+
357+
Reference the template in the canary analysis:
358+
359+
```yaml
360+
analysis:
361+
metrics:
362+
- name: "error rate"
363+
templateRef:
364+
name: newrelic-error-rate
365+
namespace: istio-system
366+
thresholdRange:
367+
max: 5
368+
interval: 1m
369+
```

0 commit comments

Comments
 (0)