Skip to content

Commit 1bec304

Browse files
Merge branch 'demo-20190130' of github.com:ModusCreateOrg/devops-infra-demo into demo-20190130
2 parents 4d16fa3 + 28434a6 commit 1bec304

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

ansible/roles/app-AfterInstall/templates/infra-demo.ini.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ enable-threads = 0
1111
http-auto-chunked = 1
1212
http-keepalive = 1
1313
uwsgi-socket = 127.0.0.1:8008
14-
14+
harakiri = 120
15+
harakiri-verbose
16+
max-requests = 2048

terraform/newrelic.tf

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,56 @@ resource "newrelic_alert_policy_channel" "alert_email" {
5555

5656
count = "${length(var.newrelic_alert_email) > 0 ? 1 : 0}"
5757
}
58+
59+
# Add a dashboard
60+
resource "newrelic_dashboard" "spindash" {
61+
title = "Spin Dashboard"
62+
63+
widget {
64+
title = "Average Transaction Duration"
65+
row = 1
66+
column = 1
67+
width = 2
68+
visualization = "faceted_line_chart"
69+
nrql = "SELECT AVERAGE(duration) from Transaction FACET appName TIMESERIES auto"
70+
}
71+
72+
widget {
73+
title = "Average Apdex"
74+
row = 2
75+
column = 1
76+
width = 2
77+
visualization = "faceted_line_chart"
78+
nrql = "SELECT apdex(duration, t: 0.4) from Transaction FACET appName TIMESERIES auto"
79+
}
80+
81+
widget {
82+
title = "Average CPU Percent"
83+
row = 3
84+
column = 1
85+
height = 1
86+
width = 2
87+
visualization = "line_chart"
88+
nrql = "SELECT average(cpuPercent) FROM SystemSample TIMESERIES auto"
89+
}
90+
91+
widget {
92+
title = "Throughput (by host)"
93+
row = 4
94+
column = 1
95+
height = 1
96+
width = 2
97+
visualization = "faceted_line_chart"
98+
nrql = "SELECT count(*) AS 'rpm' FROM Transaction WHERE appName = 'Spin' FACET host SINCE 30 minutes ago TIMESERIES 1 minute"
99+
}
100+
101+
widget {
102+
title = "Throughput (total)"
103+
row = 4
104+
column = 1
105+
height = 1
106+
width = 2
107+
visualization = "line_chart"
108+
nrql = "SELECT count(*) AS 'rpm' FROM Transaction WHERE appName = 'Spin' SINCE 30 minutes ago TIMESERIES 1 minute"
109+
}
110+
}

0 commit comments

Comments
 (0)