Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

new_relic-rest_api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

new_relic-rest_api

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

NewRelic::RestApi

New Relic client for the v2 Rest API:

https://docs.newrelic.com/docs/apis/rest-api-v2.

Installation

Add this line to your application's Gemfile:

gem 'new_relic-rest_api', require: 'new_relic/rest_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install new_relic-rest_api

Usage

You need to setup your new relic api key:

require 'new_relic/rest_api'

NewRelic::RestApi.config do |config|
  config.key = '<your-api-key>'
end

There other options you can setup like:

timeout, open_timeout, retries, ssl_options.

Then you can play with the application resource:

  applications = NewRelic::RestApi::Application.all

In order to get the metric names for each application:

  applications.map(&:metric_names)

In order to get the metrics data for each application:

  applications.map { |app| app.metric_data(names: ['<some-metric-name-from-above>']) }

FAQs

Package last updated on 30 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc