New Relic’s command-line interface (CLI) lets you work with New Relic platform features from a terminal, but it does not collect telemetry itself. If your application is already instrumented and reporting data, the practical workflow is to install the CLI, create a profile with a user key and account region, find the application’s identifiers, and run NRQL queries against the events your account actually receives.
This guide follows that workflow, explains the difference between application IDs and GUIDs, shows useful NRQL question patterns, and covers logs, deployment markers, output formats, security, and common failure modes.
As an Amazon Associate I earn from qualifying purchases.
What the New Relic CLI does—and what it does not do
The New Relic CLI is a terminal interface for New Relic platform operations and workflow automation. The vendor describes it as a way to integrate New Relic into existing workflows. It is not an agent, SDK, or telemetry collector: installing it does not instrument an application, create PageView events, or forward logs.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsBefore you begin, you need an instrumented application that is already reporting to New Relic and a New Relic user key authorized for the account you intend to query. The CLI can then help you locate the application, query its data, and add operational context such as deployment markers.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
The data path
- An APM agent, browser agent, mobile agent, logging integration, or another instrumentation source sends data to New Relic.
- New Relic stores that data as event types and attributes, subject to the retention and entitlements of your account.
- The CLI authenticates to the appropriate New Relic region and invokes platform commands.
- NRQL queries the events and returns results in a terminal-friendly format.
Prerequisites and identity concepts
- An application or service that is already reporting telemetry to New Relic.
- A New Relic user key with the permissions required for the commands you plan to run. Use the least-privilege key your organization allows.
- Your New Relic account ID.
- The account region:
us,eu, orjp. - A supported installation method for your operating system.
- A shell where you can keep credentials out of command history, shared scripts, and source control.
Three identifiers commonly appear in this workflow:
| Identifier | What it identifies | How to use it |
|---|---|---|
| Account ID | The New Relic account that owns the data | Pass it to account-scoped commands such as application search and NRQL. |
| Application ID | The numeric or account-level application identifier returned by the APM lookup | Use it when a documented APM command explicitly asks for an application ID, such as the deployment workflow. |
| GUID | The application’s globally unique entity identifier | Use it for entity-oriented commands and relationships when the command expects a GUID. |
Do not substitute the GUID for an application ID, or vice versa, simply because both appear in the same search response. Check the parameter name in the command documentation.
Install the CLI on your operating system
Installation methods can change as packages and binaries are updated. Use the method for your platform and check the current New Relic installation documentation if a package manager reports that the package or bucket is unavailable.
| Platform | Documented command or method | Notes |
|---|---|---|
| macOS | brew install newrelic-cli |
Installs the CLI through Homebrew. |
| Linux | sudo snap install newrelic-cli |
Installs the Snap package. Your distribution must support Snap. |
| Windows | Add the newrelic-cli Scoop bucket, then install the package |
The Scoop bucket setup is a separate step; follow the current Windows instructions for the exact bucket command. |
| Other or locked-down environments | Use a prebuilt binary or installer package | New Relic documents downloadable binaries, including .deb, .rpm, and Windows x64 MSI packages. |
After installation, confirm that the executable is on your PATH by running the CLI with its help option. The help output also shows the command groups available in the version you installed. Keep the installed version in mind when copying examples: command names and flags are version-sensitive.
Configure a profile, key, and region
A profile stores CLI credentials and settings so you can switch between accounts without rewriting every command. The getting-started workflow creates a profile with a user key, selects the account region, and makes that profile the default.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Create a profile
newrelic profiles add --profile tutorial --apiKey YOUR_NEW_RELIC_USER_KEY -r YOUR_REGION
Replace YOUR_NEW_RELIC_USER_KEY with a key issued for your organization and YOUR_REGION with us, eu, or jp. Never publish a real key in a script, documentation sample, shell transcript, or repository.
Make the profile the default
newrelic profiles default --profile tutorial
With a default profile, commands can use its credentials and region automatically. If you work with several accounts, create a separate profile for each and select deliberately rather than relying on a terminal session left open by someone else.
Free tools Windows power users keep installed
One-click scans. No signup required.
Credential hygiene
- Prefer a least-privilege user key rather than an administrator credential.
- Check whether your shell records command history before putting a secret on a command line.
- Do not commit profile files, exported environment variables, or copied terminal output to source control.
- Rotate a key immediately if it appears in a log, ticket, paste, or public repository.
- For automation, use your organization’s approved secret store and service-account process instead of embedding a key in a CI configuration.
The CLI reference also documents a --profile option for selecting a profile per command. An account ID can be supplied with --accountId; the NEW_RELIC_ACCOUNT_ID environment variable can override that option according to the reference. Test precedence in your installed version before standardizing a script.
Find the application and record its identifiers
Search by account ID and application name:
newrelic apm application search --accountId YOUR_ACCOUNT_ID --name NAME_OF_YOUR_APP
The response is structured data. The documented example includes accountId, applicationId, guid, name, reporting, and entity type and domain fields.
Check the search result
- Name: Confirm that the result is the intended service, especially when staging and production names are similar.
- Reporting: Use the reporting state as a prompt to investigate stale or recently renamed applications.
- Account: Verify that the returned account matches the account you selected in the profile or command.
- GUID and application ID: Save both, with labels, in your runbook. Commands may require one specific identifier.
If several applications share a name, narrow the search using the account and inspect every returned record rather than taking the first result. A missing result can mean a spelling mismatch, a different account or region, insufficient permissions, or an application that has not reported recently.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Use the NRQL command group
The CLI reference places database interactions under the newrelic nrql command group. Its global output-format option accepts JSON, Text, or YAML, with JSON documented as the default.
| Format | Best use | Trade-off |
|---|---|---|
| JSON | Automation, scripting, and preserving field names | Verbose for a person reading a quick result. |
| Text | Interactive inspection in a terminal | Less convenient for downstream parsing. |
| YAML | Readable structured output and configuration-oriented workflows | Not every shell tool or parser expects YAML. |
The reference links to detailed command documentation for the current NRQL invocation. Because subcommand names and query flags can change, open the command help for the version you installed and confirm the exact syntax before turning a query into a copy-and-paste script. The following examples show NRQL itself and the questions it answers; they are not a guarantee that every account has the named event types or attributes.
Count unique sessions over the last week
SELECT uniqueCount(session) FROM PageView SINCE 1 week ago
This asks how many distinct session values were present on PageView events during the previous week. It only produces a meaningful result if your browser or application instrumentation reports a session attribute on that event type.
Compare this week with the previous week
SELECT uniqueCount(session) FROM PageView SINCE 1 week ago COMPARE WITH 1 week ago
COMPARE WITH adds a comparable prior period. Keep the time window, event type, and filters equivalent when comparing environments or account profiles; otherwise a numerical difference may reflect query design rather than user behavior.
Plot daily PageView volume
SELECT count(*) FROM PageView SINCE 1 week ago TIMESERIES AUTO
TIMESERIES AUTO lets New Relic choose a suitable bucket size for the selected range. A chart with a sudden drop is a signal to inspect reporting health, deployment history, traffic changes, and filters—not proof of a single cause.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Break out mobile sessions by operating-system version
SELECT uniqueCount(session) FROM PageView WHERE deviceType = 'Mobile' SINCE 1 week ago FACET osVersion
FACET osVersion creates one result series or row per operating-system version. Attribute names are instrumentation-dependent; if deviceType or osVersion is absent, inspect an event sample and adjust the query to match the attributes your data actually contains.
Calculate Apdex for a customer-specific transaction
SELECT apdex(duration, t: 0.4) FROM Transaction WHERE customerName = 'Acme' SINCE 1 day ago
The threshold t: 0.4 is part of this example, not a universal service-level target. Replace the customer filter and event attributes with values your application reports, and document the threshold when you use the result in an operational review.
A safe pattern for running a query from the CLI
Use the current version’s help to identify the query subcommand and its query, account, profile, and format flags. Then construct the command in this order:
- Select the profile or confirm that the intended profile is the default.
- Set the account ID explicitly when a shell could contain more than one account context.
- Place the NRQL statement in the flag required by your installed CLI version.
- Choose
--format JSON,--format Text, or--format YAMLaccording to the consumer of the output. - Run a narrow time window first, inspect the returned event names and attributes, and expand the range only after the query behaves as expected.
For automation, capture the exit status and retain the raw JSON alongside a timestamp and account identifier. Avoid logging the user key, profile contents, or unrelated environment variables.
Use logs to add detail to a telemetry investigation
Logs are a related workflow rather than an automatic consequence of installing the CLI. The Logs UI supports filtering and NRQL queries over log events. Your account must be forwarding logs, and the fields available depend on the logging integration and agent configuration.
Best Value
New Relic’s APM logs-in-context documentation describes agents decorating logs with metadata such as span.id, trace.id, hostname, entity.guid, and entity.name. It also describes forwarding logs to New Relic and reporting some log metrics. These capabilities are enabled by default in current APM agent versions described by that documentation, but agents and deployments do not all have identical configuration or version histories.
A practical correlation sequence
- Start with the time range and service entity where the symptom appears.
- Use a trace or span identifier when one is available.
- Filter logs by the application entity and narrow the time range around the request.
- Compare the log message, error fields, and deployment timeline with the NRQL result.
- Check that missing logs are a forwarding or parsing issue before treating them as evidence that no request occurred.
Add deployment and change context
A deployment marker places a revision on an application timeline so you can compare a change with telemetry before and after it. It is a correlation aid, not proof that the deployment caused a performance change.
APM deployment marker
The getting-started workflow shows newrelic apm deployment create using an application ID and a revision. Use the exact option names shown by your installed command help, and pass the application ID returned by the APM search when that command asks for an application ID.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Change tracking
New Relic also documents a newrelic changeTracking create workflow. The documented prerequisite for that workflow is CLI version 0.104.5 or higher. Check the installed version and the current command reference before relying on change-tracking flags in a script.
When interpreting a marker, compare equivalent NRQL windows around the revision, inspect logs and traces, and account for traffic or configuration changes that occurred at the same time. A marker narrows the investigation; it does not establish causation by itself.
Query entity relationships when the data is available
New Relic documents querying entity and relationship data alongside telemetry with NRQL. The documented retention period for entity relationship data is 24 hours. That limit applies to the entity-relationship data described by the documentation, not automatically to every telemetry event or log in your account.
For an investigation that depends on relationships, run the query while the relevant relationship data is still within that window and preserve the returned result with its timestamp. Do not infer a longer retention period for other datasets from this 24-hour figure.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Common failures and recovery steps
The executable is not found
- Confirm that the package installation completed without an error.
- Check the directory installed by Homebrew, Snap, Scoop, or the downloaded package is on
PATH. - Open a new shell if your package manager changed the environment after the current shell started.
- Run the package manager’s version or list command to verify which binary is installed.
Authentication or region errors
- Confirm that the profile is selected as default or pass the intended
--profile. - Check that the region is exactly
us,eu, orjpfor the account. - Verify that the key is a New Relic user key with the permissions required by the command.
- Check for an account-ID environment variable overriding the ID you supplied on the command line.
- Rotate the key if it may have been exposed while troubleshooting.
The application search returns nothing
- Check spelling, capitalization, and punctuation in the application name.
- Confirm the account ID and region.
- Verify that the application has reported data and that your key can view it.
- Search for a broader name, then inspect the returned records and reporting state.
The NRQL query returns no rows
- Use a shorter, recent time window.
- Confirm the event type, such as
PageVieworTransaction, exists in your account. - Remove optional filters and facets, then add them back one at a time.
- Inspect attribute names; custom attributes such as
customerNameare not present unless your instrumentation sends them. - Check that the selected account is the one receiving the telemetry.
The command rejects a flag
CLI syntax is version-sensitive. Run the command’s help output, compare it with the current command reference, and update the example rather than guessing at a flag name. This is especially important for the NRQL query subcommand and for change-tracking operations.
Quick Recap
A repeatable terminal checklist
- Install the CLI using the package method for your operating system or a documented binary package.
- Create a profile with a least-privilege user key and the correct region.
- Set the intended profile as default or select it explicitly for each command.
- Search the account for the application and record its application ID and GUID separately.
- Confirm the event types and attributes your instrumentation actually reports.
- Use the current NRQL command help to assemble the invocation and choose JSON, Text, or YAML output.
- Start with a narrow query, then add time comparisons, facets, or filters.
- Correlate unusual results with logs, traces, and deployment or change markers when those workflows are configured.
- Preserve useful output with the account, profile, query, time range, and CLI version, while excluding credentials.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

