newrelic/cli
The New Relic Command Line Interface
5M+
The New Relic CLI is a project to consolidate some of the tools that New Relic offers for managing resources. Current scope is limited while the framework is being developed, but the tool as-is does perform a subset of tasks.
There are a handful of other useful tools that this does not replace. Here are some useful links to other tools that you might be interested in using at this time.
There is a docker image that can be utilized for running commands as well.
Note: You must pass in NEW_RELIC_API_KEY
, which is your Personal API
Key
APM Application Example
# Pull the latest container
$ docker pull newrelic/cli
# Run the container interactively, remove it once the command exists
# Also must pass $NEW_RELIC_API_KEY to the container
$ docker run -it --rm \
-e NEW_RELIC_API_KEY \
newrelic/cli \
entity search --name WebPortal
[
{
"accountId": 2508259,
"alertSeverity": "NOT_CONFIGURED",
"applicationId": 204261368,
"domain": "APM",
"entityType": "APM_APPLICATION_ENTITY",
"guid": "MjUwODI1OXxBUE18QVBQTElDQVRJT058MjA0MjYxMzY4",
"language": "java",
"name": "WebPortal",
"permalink": "https://one.newrelic.com/redirect/entity/MjUwODI1OXxBUE18QVBQTElDQVRJT058MjA0MjYxMzY4",
"reporting": true,
"runningAgentVersions": {
"maxVersion": "",
"minVersion": "5.3.0"
},
"settings": {
"apdexTarget": 0.5,
"serverSideConfig": false
},
"type": "APPLICATION"
}
]
docker pull newrelic/cli