New Relic Integration
Connect ReliaPulse to New Relic to monitor your application performance and infrastructure metrics using NRQL queries.
Prerequisites
- New Relic account with API access
- User API Key (not License Key)
- Account ID
Configuration
Create Integration
- Go to Dashboard → Settings → Integrations
- Click Add Integration
- Select New Relic
- Fill in the configuration:
| Field | Description | Example |
|---|---|---|
| Name | Friendly name | Production New Relic |
| API Key | User API Key | NRAK-xxx... |
| Account ID | Your NR account ID | 1234567 |
| Region | US or EU datacenter | US |
Get Your API Key
- Log in to New Relic
- Go to API Keys (from user menu)
- Create or copy a User key
- The key starts with
NRAK-
Find Your Account ID
- In New Relic, click your name in the bottom left
- Select Administration → Access Management
- Your Account ID is displayed
Creating Metrics Queries
NRQL Basics
New Relic Query Language (NRQL) is SQL-like:
SELECT average(duration) FROM Transaction WHERE appName = 'MyApp' SINCE 5 minutes agoCommon Queries
Response Time:
SELECT average(duration) FROM Transaction SINCE 5 minutes agoError Rate:
SELECT percentage(count(*), WHERE error IS true) FROM Transaction SINCE 5 minutes agoThroughput:
SELECT rate(count(*), 1 minute) FROM Transaction SINCE 5 minutes agoApdex Score:
SELECT apdex(duration, 0.5) FROM Transaction SINCE 5 minutes agoInfrastructure Metrics
CPU Usage:
SELECT average(cpuPercent) FROM SystemSample SINCE 5 minutes agoMemory Usage:
SELECT average(memoryUsedPercent) FROM SystemSample SINCE 5 minutes agoDisk Usage:
SELECT average(diskUsedPercent) FROM StorageSample SINCE 5 minutes agoQuery Configuration
| Field | Description |
|---|---|
| Name | Display name for the metric |
| Query | NRQL expression |
| Polling Interval | How often to fetch (30s - 1h) |
| Unit | Display unit (%, ms, req/s, etc.) |
| Warning Threshold | Value to trigger warning |
| Critical Threshold | Value to trigger critical alert |
Multi-Series Metrics
For queries returning multiple series, enable Multi-Series Mode:
SELECT average(duration) FROM Transaction FACET appName SINCE 5 minutes agoConfigure:
- Group By Tags:
appName - Aggregation: AVG, SUM, MAX, MIN
- Max Series: Limit number of series tracked
Threshold Configuration
Threshold Operators
| Operator | Description |
|---|---|
| Greater Than | Alert when value > threshold |
| Less Than | Alert when value < threshold |
| Equal To | Alert when value = threshold |
| Not Equal To | Alert when value ≠ threshold |
Example Thresholds
Response Time (higher is worse):
- Warning: 500 (>500ms)
- Critical: 1000 (>1s)
- Operator: Greater Than
Apdex Score (lower is worse):
- Warning: 0.85 (<0.85)
- Critical: 0.7 (<0.7)
- Operator: Less Than
NRQL Tips
Time Ranges
-- Relative time
SINCE 5 minutes ago
SINCE 1 hour ago
SINCE 1 day ago
-- Absolute time (avoid for polling)
SINCE '2026-01-01 00:00:00'Filtering
-- Single condition
WHERE appName = 'MyApp'
-- Multiple conditions
WHERE appName = 'MyApp' AND host LIKE 'prod%'
-- Exclude values
WHERE error IS NOT trueAggregation
-- Average
SELECT average(duration) FROM Transaction
-- Percentiles
SELECT percentile(duration, 95) FROM Transaction
-- Count
SELECT count(*) FROM Transaction
-- Rate per minute
SELECT rate(count(*), 1 minute) FROM TransactionFaceting (Group By)
-- Group by single attribute
SELECT average(duration) FROM Transaction FACET appName
-- Group by multiple attributes
SELECT average(duration) FROM Transaction FACET appName, hostTroubleshooting
Authentication Failed
- Verify API key is a User key (starts with
NRAK-) - Check key has not expired
- Ensure key has appropriate permissions
No Data Returned
- Test query in New Relic Query Builder first
- Check
SINCEclause covers time with data - Verify event type exists (Transaction, SystemSample, etc.)
Account Not Found
- Verify Account ID is correct
- Check region setting (US vs EU)
- Ensure API key has access to the account
Query Timeout
- Simplify query (reduce time range)
- Add more specific WHERE clauses
- Avoid expensive operations on large datasets
Security
- Use User API keys, not License keys
- Create dedicated keys for ReliaPulse integration
- Rotate API keys periodically
- Limit key permissions to read-only where possible