Prometheus Integration
Connect ReliaPulse to your Prometheus server to monitor metrics and create alerts based on PromQL queries.
Prerequisites
- Prometheus server accessible from ReliaPulse
- API endpoint enabled on Prometheus
- Network connectivity between services
Configuration
Create Integration
- Go to Dashboard → Settings → Integrations
- Click Add Integration
- Select Prometheus
- Fill in the configuration:
| Field | Description | Example |
|---|---|---|
| Name | Friendly name | Production Prometheus |
| URL | Prometheus API URL | https://prometheus.example.com |
| Username | Basic auth username (optional) | admin |
| Password | Basic auth password (optional) | *** |
Test Connection
Click Test Connection to verify ReliaPulse can reach your Prometheus server.
Creating Metrics Queries
Basic Query
- Go to your integration settings
- Click Metrics tab
- Click Add Query
- Enter your PromQL query
Example - CPU Usage:
avg(rate(node_cpu_seconds_total{mode!="idle"}[5m])) * 100Example - Memory Usage:
(1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100Example - HTTP Request Rate:
sum(rate(http_requests_total[5m]))Query Configuration
| Field | Description |
|---|---|
| Name | Display name for the metric |
| Query | PromQL expression |
| Polling Interval | How often to fetch (30s - 1h) |
| Unit | Display unit (%, ms, requests, etc.) |
| Warning Threshold | Value to trigger warning |
| Critical Threshold | Value to trigger critical alert |
Multi-Series Metrics
For queries that return multiple time series, enable Multi-Series Mode:
# Returns one series per instance
node_cpu_seconds_total{mode="idle"}Configure:
- Group By Tags:
instance,job - 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
CPU Usage (higher is worse):
- Warning: 70 (>70%)
- Critical: 90 (>90%)
- Operator: Greater Than
Available Memory (lower is worse):
- Warning: 1073741824 (<1GB)
- Critical: 536870912 (<512MB)
- Operator: Less Than
Linking to Components
Connect metrics to components for automatic status updates:
- Edit a component
- Set type to METRIC
- Select your Prometheus integration
- Choose or create a metrics query
- Configure thresholds
When metric exceeds critical threshold:
- Component status changes to MAJOR_OUTAGE
- Incident created automatically (if enabled)
- Notifications sent to subscribers
PromQL Tips
Rate vs Instant
Use rate() for counter metrics:
# Good - shows requests per second
rate(http_requests_total[5m])
# Bad - shows total count (always increasing)
http_requests_totalAggregation
Aggregate across instances:
# Average across all nodes
avg(node_load1)
# Sum of all requests
sum(rate(http_requests_total[5m]))
# Max latency from any pod
max(http_request_duration_seconds)Label Filtering
Filter by labels:
# Specific service
http_requests_total{service="api"}
# Exclude status codes
http_requests_total{status!~"5.."}
# Multiple conditions
http_requests_total{service="api", method="POST"}Time Ranges
Common time ranges:
[1m]- Last minute[5m]- Last 5 minutes (recommended for rate)[1h]- Last hour[1d]- Last day
Troubleshooting
Connection Failed
- Verify Prometheus URL is correct
- Check network connectivity
- Verify authentication credentials
- Ensure Prometheus API is enabled
No Data Returned
- Test query in Prometheus UI first
- Check time range of data
- Verify metric name spelling
- Check label values
SSRF Blocked
ReliaPulse blocks requests to private networks for security. Ensure your Prometheus server is accessible on a public IP or configure appropriate network access.
Security
Network Security
- Use HTTPS for Prometheus connections
- Consider VPN or private network access
- Limit Prometheus API to read-only queries
Authentication
Prometheus supports:
- Basic authentication
- Bearer token (via reverse proxy)
- mTLS (via reverse proxy)