Skip to content

Commit

Permalink
Merge pull request #2004 from sjyothi54/NR-89171
Browse files Browse the repository at this point in the history
Stripe-New Quickstart
  • Loading branch information
mdumpati authored Sep 27, 2023
2 parents 7072231 + 54d1843 commit c912884
Show file tree
Hide file tree
Showing 13 changed files with 1,259 additions and 0 deletions.
35 changes: 35 additions & 0 deletions alert-policies/stripe/clientErrors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 4xx client errors

description: |+
This alert is triggered if customer faces 4xx errors more than 5 times for 5 minutes.
type: STATIC
nrql:
query: "SELECT count(*) from Transaction WHERE httpResponseCode LIKE '4%'"

# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
valueFunction: SINGLE_VALUE

# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation
threshold: 5
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL
- priority: WARNING
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation
threshold: 3
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL

# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 86400
35 changes: 35 additions & 0 deletions alert-policies/stripe/downtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Downtime (%)

description: |+
This alert is triggered if Downtime is more than 1% for 2 minutes.
type: STATIC
nrql:
query: "SELECT percentage(count(result), where result = 'FAILED') as 'Downtime (%)' from SyntheticCheck"

# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
valueFunction: SINGLE_VALUE

# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation
threshold: 1
# Time in seconds; 120 - 3600
thresholdDuration: 120
# How many data points must be in violation for the duration
thresholdOccurrences: ALL
- priority: WARNING
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation
threshold: 0.5
# Time in seconds; 120 - 3600
thresholdDuration: 120
# How many data points must be in violation for the duration
thresholdOccurrences: ALL

# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 86400
35 changes: 35 additions & 0 deletions alert-policies/stripe/transactionSuccessRate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Transaction success rate (%)

description: |+
This alert is triggered if the Transaction success rate is below 5% for 5 minutes.
type: STATIC
nrql:
query: "SELECT FILTER(COUNT(stripe.session_id), WHERE stripe.status = 'complete') * 100.0 / COUNT(stripe.session_id) AS 'Transaction success rate (%)' from Metric"

# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
valueFunction: SINGLE_VALUE

# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
# Operator used to compare against the threshold.
operator: BELOW
# Value that triggers a violation
threshold: 5
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL
- priority: WARNING
# Operator used to compare against the threshold.
operator: BELOW
# Value that triggers a violation
threshold: 10
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL

# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 86400
Loading

0 comments on commit c912884

Please sign in to comment.