Created
June 30, 2020 15:26
-
-
Save fieldju/c93e2cdccb01fc36b98c0b4628a10c36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DashboardWidget } from '../model/newrelic' | |
import NewRelicDashboard from '../model/NewRelicDashboard' | |
import Widget from '../model/Widget' | |
const widgets: DashboardWidget[] = [ | |
Widget.builder() | |
.withTitle('Success Count') | |
.withNrql( | |
`SELECT count(controller.invocations) | |
FROM Metric | |
WHERE status = '2xx' | |
OR status = '3xx' | |
FACET customerName, customerEnvName | |
TIMESERIES AUTO` | |
) | |
.withRow(1) | |
.withColumn(1) | |
.build(), | |
Widget.builder() | |
.withTitle('Server Error Count') | |
.withNrql( | |
`SELECT count(controller.invocations) | |
FROM Metric | |
WHERE status ='5xx' | |
FACET customerName, customerEnvName | |
TIMESERIES AUTO` | |
) | |
.withRow(1) | |
.withColumn(5) | |
.build(), | |
Widget.builder() | |
.withTitle('Bad Request Count') | |
.withNrql( | |
`SELECT count(controller.invocations) | |
FROM Metric | |
WHERE status = '4xx' | |
FACET customerName, customerEnvName | |
TIMESERIES AUTO` | |
) | |
.withRow(1) | |
.withColumn(9) | |
.build(), | |
Widget.builder() | |
.withTitle('Spinnaker Releases') | |
.withNrql( | |
`SELECT uniques(spinnakerRelease) | |
FROM Metric | |
FACET customerName, customerEnvName` | |
) | |
.withHeight(6) | |
.withRow(4) | |
.withColumn(1) | |
.build() | |
] | |
const dashboard: NewRelicDashboard = new NewRelicDashboard('Managed Overview', widgets) | |
export default dashboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment