All Projects → NativeInstruments → newrelic-cli

NativeInstruments / newrelic-cli

Licence: MIT license
Newrelic client written in Python providing both CLI and Python interfaces

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to newrelic-cli

newrelic-telemetry-sdk-java
Java library for sending telemetry data to New Relic
Stars: ✭ 34 (+30.77%)
Mutual labels:  newrelic
newrelic-alerts-configurator
NewRelic alerts configurator
Stars: ✭ 39 (+50%)
Mutual labels:  newrelic
php-newrelic
PHP Library for New Relic Agent
Stars: ✭ 14 (-46.15%)
Mutual labels:  newrelic
micrometer-registry-newrelic
Micrometer registry implementation that sends data to New Relic as dimensional metrics.
Stars: ✭ 27 (+3.85%)
Mutual labels:  newrelic
k8s-metadata-injection
Kubernetes metadata injection for New Relic APM to make a linkage between APM and Infrastructure data.
Stars: ✭ 19 (-26.92%)
Mutual labels:  newrelic
lumen-newrelic
New Relic instrumentation for the Lumen framework
Stars: ✭ 26 (+0%)
Mutual labels:  newrelic
newrelic-istio-adapter
An Istio Mixer adapter to send telemetry data to New Relic.
Stars: ✭ 15 (-42.31%)
Mutual labels:  newrelic
nrql-simple
nrql-simple provides a convenient way to interact with the New Relic Insights query API.
Stars: ✭ 13 (-50%)
Mutual labels:  newrelic
k8s-webhook-cert-manager
Generate certificate suitable for use with any Kubernetes Mutating Webhook.
Stars: ✭ 59 (+126.92%)
Mutual labels:  newrelic
nr1-status-pages
NR1 Status Pages allows you to collect and display the statuses of key dependencies in one place.
Stars: ✭ 31 (+19.23%)
Mutual labels:  newrelic
apollo-newrelic-extension
Apollo Server extension library for performing NewRelic transaction traces of graphql requests
Stars: ✭ 16 (-38.46%)
Mutual labels:  newrelic
nrjmx
Command line tool to connect to a JMX server and retrieve the MBeans it exposes.
Stars: ✭ 28 (+7.69%)
Mutual labels:  newrelic
Datav
📊https://datav.io is a modern APM, provide observability for your business, application and infrastructure. It's also a lightweight alternative to Grafana.
Stars: ✭ 2,757 (+10503.85%)
Mutual labels:  newrelic
statsbit
NewRelic drop-in replacement on top of Grafana and TimescaleDB
Stars: ✭ 19 (-26.92%)
Mutual labels:  newrelic
newrelic
💎 NewRelic PHP agent integration for Nette Framework (@nette)
Stars: ✭ 19 (-26.92%)
Mutual labels:  newrelic
php7-alpine
Docker container for PHP 7 in Alpine Linux, with almost all extensions that you may need
Stars: ✭ 20 (-23.08%)
Mutual labels:  newrelic
newrelic-quickstarts
New Relic One quickstarts help accelerate your New Relic journey by providing immediate value for your specific use cases.
Stars: ✭ 46 (+76.92%)
Mutual labels:  newrelic
newrelic-telemetry-sdk-python
A python library to send data to New Relic!
Stars: ✭ 23 (-11.54%)
Mutual labels:  newrelic
newrelic-context
Contains different helpers to make life easier with NewRelic and Context.
Stars: ✭ 21 (-19.23%)
Mutual labels:  newrelic

newrelic-cli A Python CLI client and library for New Relic's API

newrelic-cli allows setting up your New Relic monitors using simple CLI tool. Also it provides a set of libraries that can be easily integrated in other Python projects. It is based on v3 version of the API when possible, falling back to v2 when features are not available in v3.

Currently only Synthetics monitors and alerts are supported.

Installation

To install using pip:

$ pip install newrelic_cli

To install from the source code:

$ git clone https://github.com/NativeInstruments/newrelic-cli.git
$ cd newrelic-cli
$ python setup.py install

Configuration

secrets

For Synthetics checks newrelic-cli uses NewRelic's Synthetics API. In order to be able to use it you have to provide admin's API key to the script. More information on New Relic API keys can be found at: https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/api-keys

The API key should be stored in the secrets configuration file in the following format:

By default newrelic-cli will look for secrets config in the file: ~/.new_relic/secrets.yaml. This setting can be overriden with --secrets-file command-line flag

monitors

Configuration of the monitors is stored in the configuration file. By default newrelic-cli looks up for the config.yaml in the current working directory. This setting can be overriden with --config-file or -c command-line arguments.

The configuration file has the following format:

The monitors section in the configuration file represents set of monitors. Each monitor definition starts with a label. Label can be any string and must be unique. Inside of the definition the following fields are recognized:

  • name - optional name of the monitor. Must be unique. If not set - a label is used instead.
  • type - required monitor type. So far only SCRIPT_API is supported
  • frequency - required monitor check frequency in minutes. Must be one of 1, 5, 10, 15, 30, 60, 360, 720, or 1440 (this is a limitation on the New Relic side)
  • locations - required list of locations for checks. Full list of supported locations available in New Relic documentation: https://docs.newrelic.com/docs/apis/synthetics-rest-api/monitor-examples/manage-synthetics-monitors-via-rest-api#list-locations
  • alert_policy - optional name of the New Relic Alert Policy used in case of script failure.
  • script_file - required field describing the script file to be used for the monitor

The context section of the configuration file contains a YAML dict with key-value paris. This context will be applied to each template script file before uploading it. Values of the global context may be overriden by each script's own context.

script file options

  • name - required path to the file containing script. Can be absolute or relative to the configuration file.
  • template - optional templating format used to parse configuration file. Currently only jinja is supported
  • context - optional field containing YAML dict with key-value pairs. This context will be applied to the template before uploading it. Can contain same keys as global context. In this case values from local context will override global values.

Usage

Python package installs a runnable script called newrelic-cli. Currently the following actions are supported:

  • upload-monitors - uploads all monitors described in the configuration file. Filter regex limiting scope can be supplied using --filter or -f options.
  • delete-monitos - deletes all monitors that match filter provided in --filter or -f option. By default doesn't match on anything.
  • list-monitors - outputs a list of all monitors that are currently present on the New Relic. Also supports --filter or -f options.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].