query_nrql
Execute NRQL queries against New Relic to retrieve and analyze performance data, logs, traces, and metrics for monitoring and troubleshooting.
Instructions
Execute a NRQL query against New Relic. Common event types: Transaction, TransactionError, Span, Log, Metric, KeyTransaction, ExternalCall, SyntheticCheck, PageView, MobileSession. Tips: Use SINCE X hours/days ago for time ranges (e.g. SINCE 3 hours ago). For high-volume apps, use shorter time windows (1-3 hours) to avoid query timeouts. Use TIMESERIES for trend data over time. Use FACET for grouping results. Prefer uniqueCount() over uniques() for high-cardinality attributes. Use LIMIT to cap result rows (default is 10 for FACET queries). Time range formats: SINCE 1 hour ago, SINCE '2024-01-15 00:00:00', SINCE timestamp.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | NRQL query to execute | |
| account_id | No | New Relic account ID (optional, uses default if not provided) |