newrelic-observability

Run NRQL queries and retrieve APM performance summaries from New Relic.

656|82|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/incidentfox/incidentfox --skill newrelic-observability
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: newrelic-observability
Source: https://github.com/incidentfox/incidentfox/tree/main/sre-agent/.claude/skills/observability-newrelic
Command: npx skills add https://github.com/incidentfox/incidentfox --skill newrelic-observability

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, and includes scripts (resource) components.

What problem does it solve?

Investigating application performance issues in New Relic requires manually writing NRQL queries and navigating dashboards, which slows down incident response when you need quick answers about response times, error rates, and throughput.

Core Features & Use Cases

  • NRQL Query Execution: Run arbitrary NRQL queries against a New Relic account via the GraphQL API and get structured JSON results.
  • APM Summary Retrieval: Fetch response time, throughput, error rate, and Apdex score for a specific application in one call.
  • Use Case: During an incident, an engineer asks why an app is slow. The Skill pulls the APM summary, then runs TIMESERIES NRQL queries on duration and error percentage to pinpoint when latency spiked and which transactions are slowest.

Quick Start

Ask the agent to check the error rate and response time for your application in New Relic over the last hour.

Frequently Asked Questions about newrelic-observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an NRQL query from the command line?

Use the query_nrql.py script with your New Relic account ID and query string, for example: python query_nrql.py --account-id ID --query "SELECT average(duration) FROM Transaction SINCE 1 hour ago". Results are returned as formatted JSON.

How do I check application error rate in New Relic?

Run an NRQL query like SELECT percentage(count(*), WHERE error = true) FROM Transaction WHERE appName = 'MyApp' SINCE 1 hour ago. Alternatively, get_apm_summary.py returns error rate alongside response time, throughput, and Apdex in one call.

Do I need a New Relic API key set as an environment variable?

No. In proxy mode, credentials are injected automatically by the proxy layer via NEWRELIC_BASE_URL, so NEWRELIC_API_KEY is not visible. Direct mode using NEWRELIC_API_KEY against api.newrelic.com is also supported for testing.

Why does the New Relic script fail with a configuration error?

The client raises an error when neither NEWRELIC_BASE_URL (proxy mode) nor NEWRELIC_API_KEY (direct mode) is set. Verify one of these environment variables is configured before running the scripts.

Can I query metrics other than Transaction data with NRQL?

Yes, query_nrql.py accepts any valid NRQL string, so you can query any event type available in your New Relic account. The SKILL.md reference includes examples for database duration, external calls, and faceted transaction breakdowns.