Xpersona
N

New Relic CLI Skills

CLAWHUB · Unverified

Monitor, query, and manage New Relic observability data via the newrelic CLI. Covers NRQL queries, AI Monitoring telemetry, APM performance triage, deployment markers, read-only alert and incident inspection, infrastructure monitoring, agent diagnostics, and identity/access administration. Use when user asks about LLM token usage or AI application telemetry, application performance, error rates, slow transactions, deployment tracking, incident inspection, New Relic setup, users, groups, roles, permissions, or access grants.

62
Rank
84
Safety
2.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 2K downloads reported by the source. Last updated 10/9/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17bggfcg11h05pywkwvvq4mkh83fvrq:newrelic-cli-skills
  1. Install using `clawhub skill install s17bggfcg11h05pywkwvvq4mkh83fvrq:newrelic-cli-skills` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/vince-winkintel/newrelic-cli-skills before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-vince-winkintel-newrelic-cli-skills/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

150,295 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

aimonitoring/SKILL.md

# AI Monitoring

Use the New Relic CLI to find applications reporting AI/LLM telemetry and query the
underlying AI Monitoring NRDB events.

These commands are read-only, but their results can contain sensitive prompts,
responses, tool inputs, or customer data. Query only the fields needed for the task,
keep the time range narrow, and do not paste message content into tickets, chat, logs,
or third-party systems without explicit authorization.

---

## Prerequisites

Use a New Relic User Key and an account ID with access to the target account:

```bash
export NEW_RELIC_API_KEY="NRAK-..."
export NEW_RELIC_ACCOUNT_ID="1234567"
```

Prefer an existing profile when one is configured. Never print the API key or include
it in command output.

---

## Find AI-enabled Applications

Start broad. Use a name or shorter time window to reduce the discovery query, then
optionally filter the resolved entities by tags:

```bash
# Applications that reported AI Monitoring telemetry in the last seven days
newrelic aimonitoring application search --since "7 days ago"

# Require all supplied entity tags to match
newrelic aimonitoring application search \
  --tags aiEnabledApp:true,environment:production \
  --since "24 hours ago"

# Narrow the underlying event query to one application name
newrelic aimonitoring application search \
  --name "checkout-service" \
  --since "24 hours ago"
```

The result contains only each matching application's `name` and `entityGuid`. `--name`
filters the AI Monitoring events by `appName`; `--tags` filters the resolved New Relic
entities, and multiple tags use AND semantics.

Application discovery requests at most 500 unique entity GUIDs from NRDB, but then passes
the entire set to one unbatched entity lookup whose client API supports at most 25 GUIDs.
A search that finds more than 25 GUIDs can therefore fail before printing results. If the
CLI reports an entity lookup error or warns that the 500-GUID NRDB result was truncated,
shorten `--since` or add `--name`; `--tags` is applied only after entity resolution and
cannot reduce either limit or recover entities omitted by truncation. Do not treat a
partial result as a complete inventory.

Application discovery does not include `LlmVectorSearchResult` in its NRDB event set.
The `events` command below can query that event type, but an application reporting only
`LlmVectorSearchResult` will not be found by `application search`.

---

## Query AI Monitoring Events

`aimonitoring events` maps short aliases to the underlying NRDB event types:

| `--type` | NRDB event |
|---|---|
| `summary` (default) | `LlmChatCompletionSummary` |
| `message` | `LlmChatCompletionMessage` |
| `embedding` | `LlmEmbedding` |
| `feedback` | `LlmFeedbackMessage` |
| `tool` | `LlmTool` |
| `agent` | `LlmAgent` |
| `vectorsearch` | `LlmVectorSearch` |
| `vectorsearchresult` | `LlmVectorSearchResult` |

### Token and Request Summary

```bash
newrelic aimonitoring events \
  --type summary \
  --select "count(*), sum(r

alerts/SKILL.md

# Alert and Incident Inspection

Inspect alert state and incident telemetry with supported read-only New Relic CLI commands.

The CLI has no alert-management command tree. Configure policies, conditions, and notification channels through a supported New Relic API or the New Relic UI instead.

---

## View Recently Opened Incident Events

Query incident events through the supported `nrql query` command:

```bash
newrelic nrql query --accountId "$NEW_RELIC_ACCOUNT_ID" --query "
  SELECT *
  FROM NrAiIncident
  WHERE event = 'open'
  SINCE 24 hours ago
  LIMIT 20
"
```

This is read-only and reports `open` events recorded in the last 24 hours, not the current
state of every incident. It can include an incident that later closed and omit an older
incident that remains open. Incident event availability and attributes depend on the data
retained in the selected account.

## Review Recent Incident Activity

```bash
newrelic nrql query --accountId "$NEW_RELIC_ACCOUNT_ID" --query "
  SELECT count(*)
  FROM NrAiIncident
  FACET event, priority
  SINCE 1 week ago
  LIMIT MAX
"
```

Use this to summarize recent incident events without changing alert configuration or incident state.

---

## Check Entity Alert Severity

```bash
newrelic entity search --name "my-app" --type APPLICATION --domain APM | \
  jq '.[] | {name, alertSeverity}'
```

Severity values include `NOT_CONFIGURED`, `NOT_ALERTING`, `WARNING`, and `CRITICAL`. Entity search is read-only; use `newrelic apm application get --guid <GUID>` when you need details for an exact APM application returned by the search.

apm/SKILL.md

# APM Performance Triage

Use when investigating slow endpoints, high error rates, or performance regressions.

---

## Step 1: Identify the Problem App

```bash
# Get APM summary for all apps
newrelic entity search --name "" --type APPLICATION --domain APM | \
  jq '.[] | {name, alertSeverity, applicationId}'

# Get detailed APM summary for a specific app
newrelic apm application get --applicationId <APP_ID>
```

---

## Step 2: Slow Transaction Analysis

```bash
# Top 10 slowest transactions (last 1 hour)
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT average(duration), percentile(duration, 95), count(*)
  FROM Transaction
  WHERE appName = 'my-app'
  FACET name
  SINCE 1 hour ago
  LIMIT 10
  ORDER BY average(duration) DESC
"

# Transactions over SLA threshold (e.g. > 2 seconds)
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT count(*), average(duration)
  FROM Transaction
  WHERE appName = 'my-app' AND duration > 2
  FACET name
  SINCE 1 hour ago
"
```

---

## Step 3: Database Query Analysis

```bash
# Slowest DB operations
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT average(duration), count(*)
  FROM DatabaseTrace
  WHERE appName = 'my-app'
  FACET statement
  SINCE 1 hour ago
  LIMIT 10
  ORDER BY average(duration) DESC
"

# DB time as % of total transaction time
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT average(databaseDuration), average(duration),
         percentage(average(databaseDuration), average(duration)) AS 'DB %'
  FROM Transaction
  WHERE appName = 'my-app'
  SINCE 1 hour ago
"
```

---

## Step 4: Error Analysis

```bash
# Error rate by transaction
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT count(*), percentage(count(*), WHERE error IS true) AS 'Error Rate'
  FROM Transaction
  WHERE appName = 'my-app'
  FACET name
  SINCE 1 hour ago
"

# Recent errors with messages
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT message, count(*)
  FROM TransactionError
  WHERE appName = 'my-app'
  FACET message
  SINCE 1 hour ago
  LIMIT 20
"

# Full error details including stack trace fields
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT timestamp, name, message, error.class
  FROM TransactionError
  WHERE appName = 'my-app'
  SINCE 30 minutes ago
  LIMIT 10
"
```

---

## Step 5: Throughput & Apdex

```bash
# Requests per minute + Apdex trend
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT rate(count(*), 1 minute) AS 'RPM', apdex(duration, 0.5) AS 'Apdex'
  FROM Transaction
  WHERE appName = 'my-app'
  TIMESERIES 5 minutes
  SINCE 1 hour ago
"
```

---

## Step 6: Correlate with Deployments

```bash
# List recent deployments
newrelic apm deployment list --applicationId <APP_ID>

# Check if performance changed after a deploy
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT average(duration)
  FROM Transac

deployments/SKILL.md

# Deployment Markers

Record deployment events in New Relic so you can correlate releases with performance changes.

---

## Record a Deployment

```bash
newrelic apm deployment create \
  --applicationId <APP_ID> \
  --revision "v1.2.3" \
  --description "Brief description of what changed" \
  --user "deploy-bot"
```

### Required
- `--applicationId` — numeric APM application ID
- `--revision` — version string (e.g. git SHA, semver, MR number)

### Optional
- `--description` — what changed (show in NR UI on charts)
- `--user` — who/what deployed
- `--change-log` — detailed change notes

---

## Get Application ID

```bash
newrelic entity search --name "my-app" --type APPLICATION --domain APM | \
  jq '.[] | {name, applicationId}'
```

---

## List Recent Deployments

```bash
newrelic apm deployment list --applicationId <APP_ID>
```

---

## GitLab/GitHub CI Integration

Check out this skill repository into `vendor/newrelic-cli-skills` in the application CI
job, set `NEW_RELIC_API_KEY` as a masked secret, and invoke the maintained helper after a
successful deploy. In GitHub Actions, use a second `actions/checkout` step with
`repository: vince-winkintel/newrelic-cli-skills` and `path: vendor/newrelic-cli-skills`;
in GitLab, clone or add the repository as a submodule at the same path. Keep every
CI-provided value in its own quoted argument:

```bash
NEWRELIC_SKILLS_DIR=vendor/newrelic-cli-skills

"$NEWRELIC_SKILLS_DIR/scripts/deployment-marker.sh" \
  "$NEW_RELIC_APP_ID" \
  "${CI_COMMIT_SHORT_SHA:-$(git rev-parse --short=8 HEAD)}" \
  "${CI_COMMIT_TITLE:-$(git log -1 --format=%s)}" \
  "${GITLAB_USER_LOGIN:-${GITHUB_ACTOR:-ci-bot}}"
```

The helper requires a decimal application ID, converts tabs and line breaks in text fields
to spaces, rejects any remaining control characters, and forwards each accepted value as
a literal argument. Do not generate a script from CI variables and do not pass these
values through `eval` or `source`.

---

## Why Deployment Markers Matter

After recording a deployment, the New Relic UI places a vertical line on all APM charts at that timestamp. This makes it immediately obvious if:
- Response times increased after a deploy
- Error rates spiked post-release
- Throughput dropped unexpectedly

You can also query them via NRQL:

```nrql
SELECT *
FROM Deployment
WHERE appId = <APP_ID>
SINCE 1 week ago
```

---

## Automation: Mark on Every Merge

Call the repository helper from a post-merge webhook or CI step rather than copying its
implementation into generated source. Set `NEWRELIC_SKILLS_DIR` to the explicit checkout
location shown above; multi-line release descriptions are normalized to one line:

```bash
"$NEWRELIC_SKILLS_DIR/scripts/deployment-marker.sh" \
  "$NEW_RELIC_APP_ID" \
  "$RELEASE_REVISION" \
  "$RELEASE_DESCRIPTION" \
  "$DEPLOY_USER"
```

diagnostics/SKILL.md

# Agent Diagnostics

Validate New Relic agent configuration, connectivity, and reporting status.

---

## Run Full Diagnostics

```bash
newrelic diagnose run
```

Checks: API key validity, account connectivity, agent config files, log paths, proxy settings.

---

## Validate Config File

```bash
# For .NET agent on Windows
newrelic diagnose validate \
  --config "C:\ProgramData\New Relic\.NET Agent\newrelic.config"

# For Linux
newrelic diagnose validate --config /etc/newrelic/newrelic.yml
```

---

## Check Agent is Reporting

```bash
# Verify an app is actively sending data
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
  SELECT count(*)
  FROM Transaction
  WHERE appName = 'my-app'
  SINCE 10 minutes ago
"
# count = 0 means agent is not reporting

# Check entity reporting status
newrelic entity search --name "my-app" --type APPLICATION --domain APM | \
  jq '.[] | {name, reporting}'
```

---

## Check Agent Version

```bash
newrelic entity search --name "my-app" --type APPLICATION --domain APM | \
  jq '.[] | {name, tags: (.tags[] | select(.key == "agentVersion"))}'
```

---

## Connectivity Test

```bash
# Test API key and account access
newrelic profile list --format JSON
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID \
  --query "SELECT count(*) FROM NrIntegrationError SINCE 1 hour ago"
```

If `NrIntegrationError` count > 0, data ingestion has issues.

---

## Common Issues

| Symptom | Likely Cause | Fix |
|---|---|---|
| App shows `reporting: false` | Agent stopped or config missing | Restart app pool / check agent logs |
| Transaction count = 0 | IIS app pool recycled without agent init | Ensure agent auto-instruments on startup |
| High `NrIntegrationError` | Data too large or malformed | Check agent logs for serialization errors |
| `alertSeverity: NOT_CONFIGURED` | No alert conditions on the entity | Add NRQL or APM metric conditions |

---

## .NET Agent Specific (Windows/IIS)

```bash
# Check which apps are instrumented on a host
newrelic entity search --name "my-host" --type HOST | \
  jq '.[] | .tags[] | select(.key == "apmApplicationNames")'

# Agent logs location (Windows)
# C:\ProgramData\New Relic\.NET Agent\Logs\
```

---

## Profile Management

```bash
# Machine-readable profile inventory; do not parse decorated table text
newrelic profile list --format JSON

# Print the persisted default profile name (the JSON key is capitalized `Name`)
newrelic profile list --format JSON | jq -r '.[] | select(.isDefault) | .Name'

# Switch profile; shell-quote the exact profile name
newrelic profile default --profile "production.us"

# Add a new profile
newrelic profile add \
  --profile "staging.us" \
  --apiKey $NEW_RELIC_API_KEY \
  --accountId $NEW_RELIC_ACCOUNT_ID \
  --region US  # US, EU, JP, GOV, or FEDRAMP (alias for GOV)

# Confirm an exact profile name before deleting it
PROFILE_NAME='production.us'
if newrelic profile list --format JSON | \
  jq -e --arg p "$PROFILE_NAME" 'any(.[]; .Name == $p)' >/dev/n

Sponsored

Ads related to New Relic CLI Skills and adjacent AI workflows.