OpenTelemetry Bot d680729c09 [chore] Prepare release 0.90.0 (#29543) 1 jaar geleden
..
internal 91643ba261 [mdatagen] allow adding resource_attribute warnings (#27257) 1 jaar geleden
testdata cd91fb4789 [chore][golden] Normal timestamps in golden metric files (#23002) 1 jaar geleden
Makefile bf9686b926 [httpcheckreceiver] new receiver (#14191) 2 jaren geleden
README.md c63cd378d7 [chore] additional example in httpcheck receiver (#27411) 1 jaar geleden
config.go 676559a2a4 [receiver/httpcheck] fail fast on endpoint missing scheme (#23808) 1 jaar geleden
config_test.go 158ee0e040 [chore] Update tests to include scraper settings (#24653) 1 jaar geleden
doc.go 5133f4ccd6 [chore] use license shortform (#22052) 1 jaar geleden
documentation.md 141111972f [chore] use metadata.Type with httpcheckreceiver (#22842) 1 jaar geleden
factory.go f3e4755ae7 [receiver/httpcheck] address review comments from #23439 (#24002) 1 jaar geleden
factory_test.go f3e4755ae7 [receiver/httpcheck] address review comments from #23439 (#24002) 1 jaar geleden
go.mod d680729c09 [chore] Prepare release 0.90.0 (#29543) 1 jaar geleden
go.sum 40b485f08a Update core for v0.90.0 release (#29539) 1 jaar geleden
metadata.yaml 326d0261f9 [cmd/mdatagen] Rename aggregation to aggregation_temporality for sum metrics (#24808) 1 jaar geleden
scraper.go 67fb043685 [receiver/httpcheck] support scraping multiple targets (#23439) 1 jaar geleden
scraper_test.go cd92432fd2 [pkg/golden] internal/coreinternal/golden -> pkg/golden (#28636) 1 jaar geleden

README.md

HTTP Check Receiver

Status
Stability development: metrics
Distributions contrib, sumo
Issues Open issues Closed issues
Code Owners @codeboten

The HTTP Check Receiver can be used for synthethic checks against HTTP endpoints. This receiver will make a request to the specified endpoint using the configured method. This scraper generates a metric with a label for each HTTP response status class with a value of 1 if the status code matches the class. For example, the following metrics will be generated if the endpoint returned a 200:

httpcheck.status{http.status_class:1xx, http.status_code:200,...} = 0
httpcheck.status{http.status_class:2xx, http.status_code:200,...} = 1
httpcheck.status{http.status_class:3xx, http.status_code:200,...} = 0
httpcheck.status{http.status_class:4xx, http.status_code:200,...} = 0
httpcheck.status{http.status_class:5xx, http.status_code:200,...} = 0

Configuration

The following configuration settings are available:

  • targets (required): The list of targets to be monitored.
  • collection_interval (optional, default = 60s): This receiver collects metrics on an interval. Valid time units are ns, us (or µs), ms, s, m, h.
  • initial_delay (optional, default = 1s): defines how long this receiver waits before starting.

Each target has the following properties:

  • endpoint (required): the URL to be monitored
  • method (optional, default: GET): The HTTP method used to call the endpoint

Additionally, each target supports the client configuration options of confighttp.

Example Configuration

receivers:
  httpcheck:
    targets:
      - endpoint: http://endpoint:80
        method: GET
      - endpoint: http://localhost:8080/health
        method: GET
      - endpoint: http://localhost:8081/health
        method: POST
        headers:
          test-header: "test-value"
    collection_interval: 10s

Metrics

Details about the metrics produced by this receiver can be found in documentation.md