Skip to content

Commit

Permalink
feat: add golden signals pack
Browse files Browse the repository at this point in the history
  • Loading branch information
aswanson-nr committed May 26, 2021
1 parent d6939d1 commit c376a4c
Show file tree
Hide file tree
Showing 10 changed files with 369 additions and 0 deletions.
37 changes: 37 additions & 0 deletions packs/golden-signals-web/alerts/cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---

name: CPU Usage

details: |+
This alert fires when a host's CPU usage goes above 90 percent for a period of 5 minutes.
type: STATIC

nrql:
query: "from SystemSample select average(cpuPercent) facet hostname"

valueFunction: SINGLE_VALUE

# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
operator: ABOVE
# Value that triggers a violation
threshold: 90
# Time in seconds; 120 - 3600, must be a multiple of 60 for Baseline conditions
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL

# Loss of Signal Settings
expiration:
# Close open violations if signal is lost (Default: false)
closeViolationsOnExpiration: true
# Open "Loss of Signal" violation if signal is lost (Default: false)
openViolationOnExpiration: false
# Time in seconds; Max value: 172800 (48hrs), null if closeViolationsOnExpiration and openViolationOnExpiration are both 'false'
expirationDuration: 86400

# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 86400
37 changes: 37 additions & 0 deletions packs/golden-signals-web/alerts/errors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---

name: Errors

details: |+
This alert fires when the 10 percent of the transactions against an application end with an error, over a period of 5 minutes.
type: STATIC

nrql:
query: "from Transaction select percentage(count(*), where error is not false) as 'Errors' where transactionType = 'Web' facet appName"

valueFunction: SINGLE_VALUE

# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
operator: ABOVE
# Value that triggers a violation
threshold: 10
# Time in seconds; 120 - 3600, must be a multiple of 60 for Baseline conditions
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL

# Loss of Signal Settings
expiration:
# Close open violations if signal is lost (Default: false)
closeViolationsOnExpiration: true
# Open "Loss of Signal" violation if signal is lost (Default: false)
openViolationOnExpiration: false
# Time in seconds; Max value: 172800 (48hrs), null if closeViolationsOnExpiration and openViolationOnExpiration are both 'false'
expirationDuration: 86400

# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 86400
38 changes: 38 additions & 0 deletions packs/golden-signals-web/alerts/memory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---

name: Memory Usage

details: |+
When memory limits are reached, applications can do weird and unpredicable things.
This alert fires when the percentage of memory used on a host exceeds 90 percent for 5 minutes.
type: STATIC

nrql:
query: "from SystemSample select average(memoryUsedPercent) facet hostname"

valueFunction: SINGLE_VALUE

# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
operator: ABOVE
# Value that triggers a violation
threshold: 90
# Time in seconds; 120 - 3600, must be a multiple of 60 for Baseline conditions
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL

# Loss of Signal Settings
expiration:
# Close open violations if signal is lost (Default: false)
closeViolationsOnExpiration: true
# Open "Loss of Signal" violation if signal is lost (Default: false)
openViolationOnExpiration: false
# Time in seconds; Max value: 172800 (48hrs), null if closeViolationsOnExpiration and openViolationOnExpiration are both 'false'
expirationDuration: 86400

# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 86400
37 changes: 37 additions & 0 deletions packs/golden-signals-web/alerts/response_time.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---

name: Response time

details: |+
This alert fires when the average transaction duration is above 5 seconds for 5 mintues.
type: STATIC

nrql:
query: "FROM Transaction select average(duration) where transactionType = 'Web' facet appName"

valueFunction: SINGLE_VALUE

# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
operator: ABOVE
# Value that triggers a violation
threshold: 5
# Time in seconds; 120 - 3600, must be a multiple of 60 for Baseline conditions
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL

# Loss of Signal Settings
expiration:
# Close open violations if signal is lost (Default: false)
closeViolationsOnExpiration: true
# Open "Loss of Signal" violation if signal is lost (Default: false)
openViolationOnExpiration: false
# Time in seconds; Max value: 172800 (48hrs), null if closeViolationsOnExpiration and openViolationOnExpiration are both 'false'
expirationDuration: 86400

# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 86400
38 changes: 38 additions & 0 deletions packs/golden-signals-web/alerts/throughput.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---

name: Throughput

details: |+
Throughput is a great way to measure the health of your applications.
This alert fires when the throughput of a web application drops below 5 transactions in a 5 minute period.
type: STATIC

nrql:
query: "FROM Transaction select count(*) where transactionType = 'Web' facet appName"

valueFunction: SINGLE_VALUE

# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
operator: BELOW
# Value that triggers a violation
threshold: 5
# Time in seconds; 120 - 3600, must be a multiple of 60 for Baseline conditions
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL

# Loss of Signal Settings
expiration:
# Close open violations if signal is lost (Default: false)
closeViolationsOnExpiration: true
# Open "Loss of Signal" violation if signal is lost (Default: false)
openViolationOnExpiration: false
# Time in seconds; Max value: 172800 (48hrs), null if closeViolationsOnExpiration and openViolationOnExpiration are both 'false'
expirationDuration: 86400

# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 86400
19 changes: 19 additions & 0 deletions packs/golden-signals-web/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# Name of the pack
name: Golden Signals for Web Servers

# Description of the pack
description: |+
Golden signals alerts for web servers. Includes alerts and a dashboard for throughput, errors, response time, CPU usage, and memory usage.
# Support level: New Relic | Verified | Community
level: New Relic

# Design
icon: icon.jpeg
logo: logo.png

# Authors of the pack
authors:
- New Relic
- Alec Swanson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
163 changes: 163 additions & 0 deletions packs/golden-signals-web/dashboards/golden_signals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"name": "Golden Signals Web",
"description": null,
"permissions": "PUBLIC_READ_WRITE",
"pages": [
{
"name": "Golden Signals Web",
"description": null,
"widgets": [
{
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 1,
"row": 1,
"height": 3,
"width": 4
},
"title": "Response Time",
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Transaction select average(duration) where transactionType = 'Web' TIMESERIES facet appName"
}
],
"yAxisLeft": {
"zero": true
}
},
"linkedEntityGuids": null
},
{
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 5,
"row": 1,
"height": 3,
"width": 4
},
"title": "Throughput",
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "FROM Transaction select count(*) where transactionType = 'Web' TIMESERIES facet appName"
}
],
"yAxisLeft": {
"zero": true
}
},
"linkedEntityGuids": null
},
{
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 9,
"row": 1,
"height": 3,
"width": 4
},
"title": "Errors %",
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "from Transaction select percentage(count(*), where error is not false) as 'Errors' where transactionType = 'Web' TIMESERIES facet appName"
}
],
"yAxisLeft": {
"zero": true
}
},
"linkedEntityGuids": null
},
{
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 1,
"row": 4,
"height": 3,
"width": 4
},
"title": "Average CPU Usage",
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "from SystemSample select average(cpuPercent) TIMESERIES facet hostname"
}
],
"yAxisLeft": {
"zero": true
}
},
"linkedEntityGuids": null
},
{
"visualization": {
"id": "viz.line"
},
"layout": {
"column": 5,
"row": 4,
"height": 3,
"width": 4
},
"title": "Memory Usage",
"rawConfiguration": {
"facet": {
"showOtherSeries": false
},
"legend": {
"enabled": true
},
"nrqlQueries": [
{
"accountId": 0,
"query": "from SystemSample select average(memoryUsedPercent) timeseries facet hostname"
}
],
"yAxisLeft": {
"zero": true
}
},
"linkedEntityGuids": null
}
]
}
]
}
Binary file added packs/golden-signals-web/icon.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packs/golden-signals-web/logo.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 c376a4c

Please sign in to comment.