The Blameless platform offers integration with New Relic that allows you to monitor metrics that can be consumed within the SLO module.
The New Relic SLO integration adds a new APM integration to our SLO integrations suite. Blameless uses the following areas of the New Relic API specifically:
- Applications List
- Metrics Names
- Metric Data
First, you need to create and copy an API token. Refer to the New Relic site for more information regarding their APIs.
User
key.- Select "Account Settings" in the upper right corner of the New Relic Home Page. A drop-down option list appears.
- Select "API Keys" under the Integrations section on the left nav bar.
- Click on the "Create REST API key".
- Click on "Show" and copy the REST API key provided.
- Open or switch windows to the Blameless application.
- Select the “Settings” (gear) icon.
- Select the “Integrations” option, then the “Metrics” sub-option.
- Click on the “Manage” button associated with the “New Relic” row to select the "New Relic" app from the Integration list.
- Select the "Enable New Relic" slider to activate it.
- Scroll down to the New Relic API token field.
- Paste the copied New Relic API key in the text field.
- Click the “Save” button.
SLIs created in Blameless’ SLO Manager, and fed from New Relic metrics are built using the New Relic Query Language (NRQL)--allowing a broad and flexible support for the versatile New Relic metric types (APM, Synthetics, etc.), across all SLI types (Availability, Latency, Throughput, and Saturation).
More information regarding NRQL is available here.
- Select the SLO portal icon (target) on the Blameless web application navigation menu.
- Create and define an SLO in the Blameless web application.
- Click on the “New Relic” button under the Select Data Source label to choose “New Relic” "as the datasource.
- Click on the “SLI Type” button. Copy and paste the desired metric in the required field.
- Complete the steps to create the SLO and click the “Save” button.
- Select an SLI type. a. If you choose “Availability”, select the following metric examples:
Good metric: SELECT count(*)-sum(error) FROM Transaction
Valid metric: SELECT count(*) FROM Transaction
b. If you choose “Latency”, select the following example:SELECT average(duration) FROM Span
c. If you choose “Throughput”, select the following example::SELECT count(*) FROM Transaction
d. If you choose “Saturation”, select the following example:SELECT average(
apm.service.cpu.usertime.utilization) FROM Metric WHERE appName LIKE '%'
If the query is valid and satisfies the requirements, you should see a green checkmark.
Query: SELECT average(
apm.service.cpu.usertime.utilization) FROM Metric WHERE appName LIKE '%' SINCE 30 MINUTES
When you run the query, the Blameless Validation engine will throw the following error message:
Error: NRQL Syntax Error: Error at line 1 position 108, unexpected 'SINCE': error while querying metrics from New Relic
Query: SELECT average(
apm.service.cpu.usertime.utilization) FROM Metric WHERE appName LIKE '%' TIMESERIES
When you run the query, the Blameless Validation engine will throw the following error message because of the use of the “TIMESERIES” keyword:
Error: Please do not include TIMESERIES clause, we'll add it when querying data
Query: SELECT average(
apm.service.cpu.usertime.utilization), average(
apm.service.memory.physical) FROM Metric WHERE appName LIKE '%'
When you run the query, the Blameless Validation engine will throw the following error message because of the use more than one column value in the query:
apm.service.cpu.usertime.utilization
apm.service.memory.physical
The result is:
Error: wrong New Relic query, expected 1 element
Comments
0 comments
Article is closed for comments.