newrelic-cli-nrql
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "newrelic-cli-nrql" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-127e9818ebb9d872cad650090ca60a5f3a00d698710a5a868654b8f0f0134414. Verify the upstream source and version against https://github.com/Kilo-Org/kilo-marketplace before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
This subskill is for composing or running ad-hoc NRQL queries against New Relic telemetry data, covering facets, time windows, rates, and comparisons. For queries that fail, return empty results, or have pattern mismatches, use newrelic-nrql-debug-ladder instead.
Introduction source: third_party · Kilo-Org · 0.0.1 Reference
SkillPi interpretation
- Tasks
- This subskill should be used when composing or running ad hoc NRQL queries for New Relic telemetry, facets, time windows, rates, and comparisons. Use newrelic-nrql-debug-ladder instead for failing, empty, or schema-mismatched queries.
- Inputs and outputs
- ```bash
- Testing
- Not tested
Browse files
Frontmatter
name: "newrelic-cli-nrql"
description: "This subskill should be used when composing or running ad hoc NRQL queries for New Relic telemetry, facets, time windows, rates, and comparisons. Use newrelic-nrql-debug-ladder instead for failing, empty, or schema-mismatched queries."
metadata:
category: observability
source:
repository: "https://github.com/vince-winkintel/newrelic-cli-skills"
path: "nrql"
license_path: "LICENSE"NRQL Queries
Run ad-hoc NRQL queries against your New Relic account.
Basic Syntax
newrelic nrql query \
--accountId $NEW_RELIC_ACCOUNT_ID \
--query "YOUR NRQL HERE"
Key Event Types
| Event Type | What it tracks |
|---|---|
Transaction |
Web/non-web request timings |
TransactionError |
Exceptions and errors |
DatabaseTrace |
Individual DB query timings |
ExternalTrace |
Outbound HTTP calls |
SystemSample |
Host CPU, memory, disk |
ProcessSample |
Per-process metrics |
Log |
Log lines (if log forwarding enabled) |
PageView |
Browser page load events |
JavaScriptError |
Front-end JS errors |
Common Patterns
Response Time
SELECT average(duration), percentile(duration, 95, 99)
FROM Transaction
WHERE appName = 'my-app'
TIMESERIES 5 minutes
SINCE 1 hour ago
Error Rate
SELECT percentage(count(*), WHERE error IS true) AS 'Error %'
FROM Transaction
WHERE appName = 'my-app'
TIMESERIES 5 minutes
SINCE 1 hour ago
Throughput (RPM)
SELECT rate(count(*), 1 minute) AS 'RPM'
FROM Transaction
WHERE appName = 'my-app'
TIMESERIES
SINCE 1 hour ago
Slowest Endpoints
SELECT average(duration)
FROM Transaction
WHERE appName = 'my-app'
FACET name
SINCE 1 hour ago
LIMIT 10
ORDER BY average(duration) DESC
DB Bottlenecks
SELECT average(duration), count(*)
FROM DatabaseTrace
WHERE appName = 'my-app'
FACET statement
SINCE 1 hour ago
LIMIT 10
ORDER BY average(duration) DESC
Compare Two Time Windows
SELECT average(duration)
FROM Transaction
WHERE appName = 'my-app'
SINCE 1 hour ago
COMPARE WITH 1 day ago
Count Errors by Type
SELECT count(*)
FROM TransactionError
WHERE appName = 'my-app'
FACET error.class
SINCE 1 hour ago
Host CPU
SELECT average(cpuPercent)
FROM SystemSample
FACET hostname
TIMESERIES 5 minutes
SINCE 1 hour ago
Host Memory
SELECT average(memoryUsedPercent)
FROM SystemSample
FACET hostname
TIMESERIES 5 minutes
SINCE 1 hour ago
Time Range Shortcuts
SINCE 30 minutes ago
SINCE 1 hour ago
SINCE 3 hours ago
SINCE 1 day ago
SINCE 1 week ago
SINCE '2026-02-01 00:00:00' UNTIL '2026-02-02 00:00:00'
Useful Clauses
FACET name -- group by field
TIMESERIES 5 min -- time series chart
LIMIT 20 -- max results
ORDER BY count() DESC
COMPARE WITH 1 day ago
WHERE appName = 'x' AND duration > 1
Output Formatting
# Raw JSON
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID \
--query "SELECT count(*) FROM Transaction SINCE 1 hour ago" \
--format json
# Pretty table (default)
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID \
--query "SELECT count(*) FROM Transaction SINCE 1 hour ago"Version history
-
skills-20261103210927-6c1b454
GitHub ↗
Original release notes
Automated skills release from commit 6c1b4543cac1d45a80bf5904e4b69ac315117323
-
skills-20260928190452-ff51758
GitHub ↗
Original release notes
Automated skills release from commit ff51758b06b8249007116184096765d47bdb7505
-
skills-20260924105536-d31110d
GitHub ↗
Original release notes
Automated skills release from commit d31110d62dc0bd00c22f1d6f6a630d1e702a0049
-
skills-20260923085113-cea285e
GitHub ↗
Original release notes
Automated skills release from commit cea285ef0e4d6ec47cd2fd9fdbca03813a3363c7
-
skills-20260922193956-97d7333
GitHub ↗
Original release notes
Automated skills release from commit 97d7333d8200e5ac556c659c8669f3a83ba10866
Only the five most recent versions are shown. View full version history at the source ↗
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供完整的 NRQL 查询指南,覆盖常用事件类型和查询模式
- 面向 New Relic 用户的实际监控需求,具有明确实用价值
Highlights
- 触发描述精准完整,明确区分了适用场景和边界条件
- 清晰指明失败/为空/模式不匹配时应使用其他技能
Areas to improve
-
缺少 Phase/步骤划分 Reported severity: Minor
文档内容完整但缺少明确的执行阶段划分和出口条件说明
Recommendation: 建议增加 Phase 划分(如准备、执行、结果处理)和明确的出口条件
Highlights
- frontmatter 完整,包含名称、描述、分类和源码信息
- 提供丰富的代码示例和表格说明,便于用户理解
Areas to improve
-
未覆盖异常处理 Reported severity: Major
未提及认证失败、查询超时、网络错误等常见异常情况的处理方式
Recommendation: 建议增加异常处理说明,如重试机制、错误码解释等
Highlights
- 提供正确的 newrelic CLI 命令格式和必要参数
- 覆盖多种查询场景和输出格式选项
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.