Configure New Relic NRQL alert conditions for error rate and latency SLO thresholds

domain: newrelic.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create an alert policy via the NerdGraph alertsPolicyCreate mutation or the New Relic UI; specify the incident preference (PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET) to control how multiple triggered conditions combine into incidents.
  2. Add a NRQL alert condition using the alertsNrqlConditionStaticCreate mutation; write a NRQL query returning a single numeric value per evaluation (e.g., SELECT percentage(count(*), WHERE error IS true) FROM Transaction WHERE appName = 'MyApp'); set the aggregationMethod to EVENT_FLOW or EVENT_TIMER depending on streaming data characteristics.
  3. Set the threshold as a critical value (e.g., error rate > 1%) with a threshold duration expressed in minutes (e.g., for at least 5 minutes); optionally add a warning threshold at a lower severity level.
  4. Configure the expiration policy to specify how the condition behaves when data stops arriving (closeViolationsOnExpiration, openViolationOnExpiration); for SLO alerting, avoid opening a violation on data expiration to prevent false alerts during deployments.
  5. Attach a notification channel (Slack, PagerDuty, email) to the alert policy via the alertsNotificationChannelCreate mutation or Workflows (the preferred modern approach) using alertsWorkflowCreate to route alerts with enrichment from NRQL queries.
  6. Test the alert condition with the preview feature in the New Relic UI (signal history chart) before activating; verify that historical data would have triggered alerts at the correct times relative to known incidents.

Known gotchas

Related routes

Write New Relic NRQL queries for error rate, latency percentiles, and throughput across services using entity and deployment attributes
docs.newrelic.com · 5 steps · unrated
Implement SLO error budget burn rate alerting with multi-window alerts using Prometheus alerting rules
prometheus.io · 5 steps · unrated
Implement multi-window multi-burn-rate SLO alerting in Prometheus following the Google SRE Workbook model
prometheus.io · 6 steps · unrated

Give your agent this knowledge — and 6,400+ more routes

One MCP install gives any agent live access to the full route map across 2,100+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp