Skip to content
The open source repo for the SLO Reporter (SLO/R) New Relic One Application.
JavaScript CSS
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci chore: add deploy key fingerprint Dec 13, 2019
.github/ISSUE_TEMPLATE chore: adding open source files Dec 13, 2019
assets feat: implement search for SLO table Dec 11, 2019
docs chore(release): 1.4.3 [skip ci] Dec 18, 2019
examples chore: adding open source files Dec 13, 2019
launchers/nr1-csg-slo-r-launcher feat: add summary page launcher to view SLO attainment by Group Dec 17, 2019
nerdlets fix: slo error calculation bug Dec 18, 2019
screenshots updating SLO definition and entity overview screenshots [skip ci] Dec 18, 2019
.eslintrc.js chore: add newrelic eslint plugin Nov 20, 2019
.gitignore Initial commit Oct 23, 2019
.npmignore Initial commit Oct 23, 2019
.prettierrc.js chore: add newrelic eslint plugin Nov 20, 2019
.releaserc feat: adding circleci build files Dec 13, 2019
CODE_OF_CONDUCT.md chore: rename COC and contrib. Dec 17, 2019
CONTRIBUTING.md chore: rename COC and contrib. Dec 17, 2019
LICENSE chore: adding open source files Dec 13, 2019
README.md Fix to doc path Dec 17, 2019
THIRD_PARTY_NOTICES.md chore: adding third_party manifest and notices [skip ci] Dec 17, 2019
cla.md chore: adding open source files Dec 13, 2019
package-lock.json chore: version bump for global app deployment [skip ci] Jan 2, 2020
package.json chore: version bump for global app deployment [skip ci] Jan 2, 2020
third_party_manifest.json chore: adding third_party manifest and notices [skip ci] Dec 17, 2019

README.md

GitHub release (latest SemVer including pre-releases) Snyk

Usage

SLO/R is a New Relic One open source app that calculates service-level objective (SLO) attainment and reports on it for a service. It lets you quickly define SLOs for error, availability, capacity, and latency conditions. You can use the application for reporting out your results. (SLO/R - "service-level objectives and reporting")

By measuring SLO attainment across your service estate, you'll be able to determine what signals are most important for a given service, or set of services, developed and supported by a team/organization/group. Using New Relic as a consistent basis to define and measure your SLOs offers better insight into comparative SLO attainment in your service delivery organization.

We are keen to see SLO/R evolve and grow to include additional features and visualizations. For version 1.0.1, we wanted to ship the core SLO calculation capabilities. We expect to rapidly build upon this core functionality through several releases. Please add an issue to the repo is there's a feature you'd like to see.

SLO/R provides two mechanisms for calculating SLOs: error type (calculated by defects on transactions) and availability, capacity, and latency type (calculated by total duration of alert violation).

Screenshot #1

Open source license

This project is distributed under the Apache 2 license.

What do you need to make this work?

Required:

  • New Relic APM agent(s) installed.
  • SLO/R is intended to work specifically with services reporting to New Relic via an APM Agent. The service provides an entity upon which to define SLOs. Error budget SLOs are defined directly from APM Transaction events, the other SLO types are defined using New Relic Alerts (see "Configuring SLOR alert webhook" section below).
  • A New Relic Alerts webhook to forward alert events to a SLOR_ALERTS New Relic database table. See "Configuring SLOR alert webhook" section for more details.

Getting started

  1. First, ensure that you have Git and NPM installed. If you're unsure whether you have one or both of them installed, run the following command(s) (If you have them installed these commands will return a version number, if not, the commands won't be recognized):
git --version
npm -v
  1. Next, install the New Relic One CLI by going to this link and following the instructions (5 minutes or less) to install and set up your New Relic development environment.
  2. Next, to clone this repository and run the code locally against your New Relic data, execute the following command:
nr1 nerdpack:clone -r https://github.com/newrelic/nr1-slo-r.git
cd nr1-slo-r
nr1 nerdpack:serve

Visit https://one.newrelic.com/?nerdpacks=local, navigate to the Nerdpack, and

Deploying this Nerdpack

Open a command prompt in the nerdpack's directory and run the following commands.

# If you need to create a new uuid for the account to which you're deploying this Nerdpack, use the following
# nr1 nerdpack:uuid -g [--profile=your_profile_name]
# to see a list of APIkeys / profiles available in your development environment, run nr1 credentials:list
nr1 nerdpack:publish [--profile=your_profile_name]
nr1 nerdpack:deploy [-c [DEV|BETA|STABLE]] [--profile=your_profile_name]
nr1 nerdpack:subscribe [-c [DEV|BETA|STABLE]] [--profile=your_profile_name]

Visit https://one.newrelic.com, navigate to the Nerdpack, and

Creating a webhook to forward Alert incidents to Insights

The availability, capacity, and latency SLO types within SLO/R are calculated using the total duration of alert violations. In order to record those alert violations we need to enable an Insights directed Webhook to capture the open and close events. To enable this webhook please follow the steps below, the alert payload needs to be as specified for SLO/R to operate as expected. Please follow these instructions to enable the alert event forwarding.

For more information on sending alert data to New Relic, see Sending Alerts data to New Relic.

How to configure and use SLO/R

SLO definitions are scoped and stored with service entities. Open a service entity by exploring your services in the entity explorer from the New Relic One homepage.

Screenshot #6

Select the service you are interested in creating SLOs for. In our example we will be using the Origami Portal Service. Screenshot #7

Select the SLO/R New Relic One app from the left-hand navigation in your entity. Screenshot #16

If you (or others) haven't configured an SLO the canvas will be empty. Just click on the Define an SLO button to begin configuring your first SLO. Screenshot #1

The UI will open a side-panel to facilitate configuration. Fill in the fields:

  • SLO Name: Give your SLO a name, this has to be unique for the service or will overwrite similarly named SLOs for this entity.
  • Description: Give a quick overview of what you're basing this SLO on.
  • SLO Group: This is grouping meta-data. Typically organizations are responsible for multiple services and SLOs. This gives us an ability to roll up the SLO to an organizational attainment.
  • Target attainment: The numeric value as a percentage, you wish as your SLO target (e.g. 99.995)
  • Indicator: There are four indicators for SLOs in SLO/R - Error, Availability, Capacity, and Latency. Error SLOs are calculated from Transaction event defects. Availability, latency, and capacity SLOs are calculated by alert violations.

Example error SLO Screenshot #3

For Error SLOs you need to define the defects you wish to measure and the transaction names you want to associate with this SLO.

Example Availability SLO Screenshot #2

Alert driven SLOs depend on alert events being reported in the SLOR_ALERTS table. Please see SLO/R alerts config to ensure you're set up to capture alert events.

Once you've created a few SLOs you should see a view like the following:

Screenshot #4

How is SLO/R arriving at the SLO calculations?

For details, see Alert SLOs and Error SLOs.

Support

New Relic has open-sourced this project. This project is provided AS-IS WITHOUT WARRANTY OR DEDICATED SUPPORT. Issues and contributions should be reported to the project here on GitHub.

We encourage you to bring your experiences and questions to the Explorers Hub where our community members collaborate on solutions and new ideas.

Community

New Relic hosts and moderates an online forum where customers can interact with New Relic employees as well as other customers to get help and share best practices. Like all official New Relic open source projects, there's a related community topic in the New Relic Explorers Hub. You can find this project's topic/threads here:

https://discuss.newrelic.com/t/track-your-service-level-objectives-with-the-slo-r-nerdpack/90046

Issues and enhancement requests

Issues and enhancement requests can be submitted in the Issues tab of this repository. Please search for and review the existing open issues before submitting a new issue.

Contributing

Contributions are welcome (and if you submit an enhancement request, expect to be invited to contribute it yourself 😁). Please review our contributors guide.

Keep in mind that when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. If you'd like to execute our corporate CLA, or if you have any questions, please drop us an email at opensource+nr1-slo-r@newrelic.com.

You can’t perform that action at this time.