Skip to content

Commit

Permalink
Updated alert and dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
sjyothi54 committed Sep 15, 2023
1 parent f3f3b82 commit 7a99ca2
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: CPU usage (%)
name: 4xx client errors

description: |+
This alert is triggered if CPU usage exceeds 90% for 5 minutes.
This alert is triggered if customer faces 4xx errors more than 5 times for 5 minutes.
type: STATIC
nrql:
query: "SELECT latest(host.cpuPercent) AS 'CPU Used %' FROM Metric"
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
Expand All @@ -15,7 +15,7 @@ terms:
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation
threshold: 90
threshold: 5
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration
Expand All @@ -24,7 +24,7 @@ terms:
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation
threshold: 80
threshold: 3
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration
Expand Down
50 changes: 43 additions & 7 deletions dashboards/stripe/stripe.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,33 +279,69 @@
}
},
{
"title": "Transaction volume",
"title": "4xx client errors",
"layout": {
"column": 9,
"row": 3,
"width": 4,
"width": 2,
"height": 2
},
"linkedEntityGuids": null,
"visualization": {
"id": "viz.area"
"id": "viz.billboard"
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
"nrqlQueries": [
{
"accountIds": [],
"query": "SELECT count(*) from Transaction FACET concat(httpResponseCode, ' client errors') WHERE httpResponseCode LIKE '4%' "
}
],
"platformOptions": {
"ignoreTimeRange": false
},
"thresholds": [
{
"alertSeverity": "CRITICAL",
"value": 1
}
]
}
},
{
"title": "5xx server errors",
"layout": {
"column": 11,
"row": 3,
"width": 2,
"height": 2
},
"linkedEntityGuids": null,
"visualization": {
"id": "viz.billboard"
},
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"nrqlQueries": [
{
"accountIds": [],
"query": "SELECT uniqueCount(stripe.session_id)as'Transaction volume' from Metric TIMESERIES "
"query": "SELECT count(*) from Transaction FACET concat(httpResponseCode, ' server errors') WHERE httpResponseCode LIKE '5%'"
}
],
"platformOptions": {
"ignoreTimeRange": false
}
},
"thresholds": [
{
"alertSeverity": "CRITICAL",
"value": 1
}
]
}
},
{
Expand Down
Binary file modified dashboards/stripe/stripe01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7a99ca2

Please sign in to comment.