English
Integrations
Prometheus

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

  1. Go to Dashboard → Settings → Integrations
  2. Click Add Integration
  3. Select Prometheus
  4. Fill in the configuration:
FieldDescriptionExample
NameFriendly nameProduction Prometheus
URLPrometheus API URLhttps://prometheus.example.com
UsernameBasic auth username (optional)admin
PasswordBasic auth password (optional)***

Test Connection

Click Test Connection to verify ReliaPulse can reach your Prometheus server.

Creating Metrics Queries

Basic Query

  1. Go to your integration settings
  2. Click Metrics tab
  3. Click Add Query
  4. Enter your PromQL query

Example - CPU Usage:

avg(rate(node_cpu_seconds_total{mode!="idle"}[5m])) * 100

Example - Memory Usage:

(1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100

Example - HTTP Request Rate:

sum(rate(http_requests_total[5m]))

Query Configuration

FieldDescription
NameDisplay name for the metric
QueryPromQL expression
Polling IntervalHow often to fetch (30s - 1h)
UnitDisplay unit (%, ms, requests, etc.)
Warning ThresholdValue to trigger warning
Critical ThresholdValue 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

OperatorDescription
Greater ThanAlert when value > threshold
Less ThanAlert when value < threshold
Equal ToAlert when value = threshold
Not Equal ToAlert 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:

  1. Edit a component
  2. Set type to METRIC
  3. Select your Prometheus integration
  4. Choose or create a metrics query
  5. 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_total

Aggregation

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)

Related