| name | newrelic-cli-diagnostics |
| description | This subskill should be used when diagnosing New Relic agent configuration, API connectivity, profile authentication, or missing telemetry with the New Relic CLI. Use the parent newrelic-cli-skills skill for setup and routing. |
| metadata | {"category":"observability","source":{"repository":"https://github.com/vince-winkintel/newrelic-cli-skills","path":"diagnostics","license_path":"LICENSE"}} |
Agent Diagnostics
Validate New Relic agent configuration, connectivity, and reporting status.
Run Full Diagnostics
newrelic diagnose run
Checks: API key validity, account connectivity, agent config files, log paths, proxy settings.
Validate Config File
newrelic diagnose validate \
--config "C:\ProgramData\New Relic\.NET Agent\newrelic.config"
newrelic diagnose validate --config /etc/newrelic/newrelic.yml
Check Agent is Reporting
newrelic nrql query --accountId $NEW_RELIC_ACCOUNT_ID --query "
SELECT count(*)
FROM Transaction
WHERE appName = 'my-app'
SINCE 10 minutes ago
"
newrelic entity search --name "my-app" --type APPLICATION --domain APM | \
jq '.[] | {name, reporting}'
Check Agent Version
newrelic entity search --name "my-app" --type APPLICATION --domain APM | \
jq '.[] | {name, tags: (.tags[] | select(.key == "agentVersion"))}'
Connectivity Test
newrelic profile list
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)
newrelic entity search --name "my-host" --type HOST | \
jq '.[] | .tags[] | select(.key == "apmApplicationNames")'
Profile Management
newrelic profile list
newrelic profile default --profile production
newrelic profile add \
--profile staging \
--apiKey $NEW_RELIC_API_KEY \
--accountId $NEW_RELIC_ACCOUNT_ID \
--region US