Diagnostics

From Kilo-Org/kilo-marketplace · View interactive version

Diagnostics is an AI agent skill from the GitHub repository Kilo-Org/kilo-marketplace. 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.

How to use this skill

Skill file

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

# 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

# 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

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

Connectivity Test

# Test API key and account access
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)

# 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

# List all profiles
newrelic profile list

# Switch profile
newrelic profile default --profile production

# Add a new profile
newrelic profile add \
  --profile staging \
  --apiKey $NEW_RELIC_API_KEY \
  --accountId $NEW_RELIC_ACCOUNT_ID \
  --region US
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.