turbot/newrelic

GitHub
steampipe plugin install newrelicsteampipe plugin install newrelic

New Relic + Steampipe

New Relic is a SaaS providing Monitoring, Alerting, Dashboards for applications, infrastructure, etc.

Steampipe is an open source CLI for querying cloud APIs using SQL from Turbot

List APM Applications on your New Relic account:

select
id,
name,
error_rate,
health_status,
response_time
from
newrelic_apm_application;
+-----------+------+------------+---------------+---------------+
| id | name | error_rate | health_status | response_time |
+-----------+------+------------+---------------+---------------+
| 511153982 | test | 0 | gray | 0 |
+-----------+------+------------+---------------+---------------+

Documentation

Quick start

Install

Download and install the latest New Relic plugin:

steampipe plugin install newrelic

Credentials

ItemDescription
CredentialsYou will require a New Relic API Token
PermissionsUser API Keys are associated with a user account, they have the same permissions as the user which may mean they can access multiple accounts.
RadiusEach connection represents one New Relic user, this can be across multiple accounts if the user has permissions on multiple accounts.
Resolution1. Credentials explicitly set in a steampipe config file (~/.steampipe/config/newrelic.spc).
2. Credentials specified in environment variables, e.g., NEW_RELIC_API_KEY and NEW_RELIC_REGION.

Configuration

Installing the latest New Relic plugin will create a config file (~/.steampipe/config/newrelic.spc) with a single connection named newrelic:

Configure your account details in ~/.steampipe/config/newrelic.spc:

connection "newrelic" {
plugin = "newrelic"
# New Relic API Key. Required.
# This can also be set via the 'NEW_RELIC_API_KEY' environment variable.
# api_key = "NRAK-XX0X0XX00XXXX0000XXXXXXXXX0X"
# New Relic Region - valid values are 'us' or 'eu' (default, if not chosen, is 'us'). Optional.
# This can also be set via the 'NEW_RELIC_REGION' environment variable.
# region = "us"
}

Alternatively, you can also use the standard New Relic environment variables to configure your credentials only if other arguments (api_key, region) are not specified in the connection:

export NEW_RELIC_API_KEY=NRAK-XX0X0XX00XXXX0000XXXXXXXXX0X
export NEW_RELIC_REGION=us

Get involved