Monitor HTTP Endpoints

With SigNoz, you can set up lightweight synthetic monitoring to track the health of your HTTP endpoints This document walks you through every step, from initial setup to creating dashboards and configuring alerts on your HTTP endpoints.

Basic Setup

Step 1: Install OpenTelemetry Collector

Install and set up the OpenTelemetry Collector by following the documentation.

Step 2: Configure the HTTP Check Receiver

Add the httpcheck receiver to your OpenTelemetry Collector configuration:

config.yaml
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318
  httpcheck:
    targets:
      - endpoint: http://example.com //replace with the endpoint you want to monitor
        method: GET
    collection_interval: 10s

exporters:
  otlp:
    endpoint: "ingest.<region>.signoz.cloud:443"
    tls:
      insecure: false
    headers:
      "signoz-ingestion-key": "<your-ingestion-key>"
  • Set the <region> to match your SigNoz Cloud region
  • Replace <your-ingestion-key> with your SigNoz ingestion key

Step 3: Configure the Service Pipeline

Configure the service pipeline to include the httpcheck receiver:

config.yaml
service:
    metrics:
      receivers: [otlp, httpcheck]
      processors: [batch]
      exporters: [otlp]

Step 4: Start the Collector

Start the OpenTelemetry Collector to begin collecting HTTP endpoint metrics:

./otelcol-contrib --config ./config.yaml

Understanding HTTP Check Metrics

The HTTP Check Receiver performs synthetic checks - a form of synthetic monitoring, against HTTP endpoints by making requests to specified endpoints using the configured method. It generates metrics labeled for each HTTP response status class.

The receiver creates a metric named httpcheck_status with value 1 if the check resulted in status_code matching the status_class, otherwise 0.

Monitoring Multiple Endpoints

You can configure multiple targets for the httpcheck receiver to monitor several endpoints simultaneously:

receivers:
  httpcheck:
    targets:
      - endpoint: http://example.com
        method: GET
      - endpoint: http://my-app.com
        method: GET
    collection_interval: 10s

Multiple Collection Intervals

If you need different collection intervals for different endpoints, create multiple httpcheck receiver instances. Each instance can have its own collection interval and targets:

receivers:
  httpcheck/rapid:
    targets:
      - endpoint: http://critical-service.com
        method: GET
    collection_interval: 30s
  
  httpcheck/frequent:
    targets:
      - endpoint: http://important-service.com
        method: GET
    collection_interval: 60s
  
  httpcheck/low:
    targets:
      - endpoint: http://background-service.com
        method: GET
    collection_interval: 300s

service:
  metrics:
    receivers: [otlp, httpcheck/rapid, httpcheck/frequent, httpcheck/low]
    processors: [batch]
    exporters: [otlp]

Note: The receiver name format is httpcheck for the base receiver and httpcheck/{name} for additional instances. Using httpchecklow (without the slash) would return an error.

Creating Dashboards in SigNoz

Once the collector is running and sending data to SigNoz, you can create dashboards to visualize HTTP endpoint health:

Step 1: Create a New Dashboard

  1. Navigate to your SigNoz account
  2. Go to the Dashboard tab
  3. Click on New Dashboard button
  4. Choose New Panel and select Time Series chart type for HTTP endpoint monitoring
Selecting Time Series chart type
Selecting Time Series chart type for HTTP monitoring

Step 2: Configure the Query

  1. In the Query Builder tab, enter "http" in the metric search
  2. You should see httpcheck.status and other HTTP-related metrics
HTTP metrics in Query Builder
HTTP metrics available in Query Builder
  1. Select httpcheck.status as your metric
  2. Add a WHERE clause: http.status_class = 2xx to monitor successful responses
Configuring httpcheck_status query
Configuring httpcheck.status query with WHERE clause
  1. You can also Average By specific endpoints using the http.url attribute

Step 3: Visualize Endpoint Health

The resulting chart will show:

  • Value of 1 when endpoints are healthy (returning 2xx status codes)
  • Value of 0 when endpoints are down or returning error codes
  • Different lines for each monitored endpoint
HTTP endpoint health visualization
HTTP endpoint health visualization showing status over time

Available Metrics

The HTTP Check receiver provides several metrics:

MetricDescriptionType
httpcheck.statusHTTP response status (1 for matching status class, 0 otherwise)Sum
httpcheck.durationDuration of the HTTP request in millisecondsGauge
httpcheck.errorNumber of errors during HTTP checksSum

Available Attributes

Key attributes for filtering and grouping:

AttributeDescriptionExample Values
http.urlFull HTTP request URLhttp://example.com, http://my-app.com/health
http.status_codeHTTP response status code200, 404, 500
http.methodHTTP request methodGET, POST, PUT
http.status_classHTTP response status class2xx, 4xx, 5xx

For more details about the metrics and their related attributes, refer to the HTTP Check Receiver documentation.

Setting Up Alerts

You can create alerts to get notified when endpoints go down:

Step 1: Create Alert from Dashboard

  1. In your dashboard panel showing HTTP endpoint health, click the dropdown menu
  2. Select Create Alerts
Creating alert from dashboard panel
Creating alert from dashboard panel dropdown
  1. This will take you to the alerts configuration page

Step 2: Configure Alert Conditions

Alert configuration page
Alert configuration page with conditions setup

Example alert configuration:

Metrics: httpcheck.status         
WHERE: http.status_class = 2xx 
Avg By: http.url


condition: below the threshold at least once during the last 5 mins
threshold: 1   

The alert fires when any of the monitored endpoint does not respond with 2xx (success) response (even once) during a 5-minute window.

Troubleshooting

Common Issues:

  • No metrics appearing: Check that the httpcheck receiver is included in the metrics pipeline
  • Permission errors: Ensure the collector has network access to the target endpoints
  • SSL/TLS errors: Configure appropriate TLS settings for HTTPS endpoints
  • High resource usage: Reduce collection frequency for non-critical endpoints

Additional Resources

For a more detailed guide about HTTP endpoint monitoring with OpenTelemetry, refer to our comprehensive blog post: Health Check Monitoring with OpenTelemetry.

Was this page helpful?