opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

New component: HTTP Check

Open philipcwhite opened this issue 3 years ago • 4 comments

The purpose and use-cases of the new component

Purpose: To monitor the availability and performance of HTTP endpoints. Use case: There are two main ways of monitoring if websites are up and running. Full synthetics (i.e. Selenium) and simple HTTP checks. These are some of the best leading indicators of application availability, and sadly, both are missing from OTel. This proposal is for the latter. This would look to perform simple HTTP checks. Simple checks are beneficial in that they require less overhead than full transactions and can typically be run more frequently. This benefits observability by detecting issues faster through increased frequency.

Example configuration for the component

receivers:
  http_checks:
    -name: Test
      url:  http://localhost:5000
      verify:
        -text: "Hello World"

Telemetry data types supported

This is a metric receiver and would collect the following metrics: Gauges http_availability: 1/0 (up/down) http_response_time: (ms) http_verification: 1/0 (true/false)

Counters http_response_ok: 2XX codes http_response_redirect: 3XX codes http_response_not_found: 4XX codes http_response_error: 5XX codes

Sponsor (Optional)

philipcwhite avatar Jun 06 '22 16:06 philipcwhite

Would be happy to sponsor this. Couple of questions:

  1. Is it worth including a method for the check?
  2. Does make sense to make it possible to check multiple urls with the same receiver?
  3. The content check may be best suited for a regex, thinking of the case where someone may need to check a status page that includes something like a date.

codeboten avatar Jun 08 '22 21:06 codeboten

Thank you.

  1. Possibly. I am new to Go and will most likely need assistance with this. I'm a Python developer so I have some learning to do. I am going to try write a stand alone app for this and request assistance integrating it correctly. I've done some testing with builder and was able to successfully able to get a package built so fingers crossed.
  2. Yes. I figured the array in yaml (-name)would be for multiple urls.
  3. I agree, regex would be good for finding text.

philipcwhite avatar Jun 09 '22 01:06 philipcwhite

@philipcwhite is this component still something you're actively working on? if not i'd be happy to take it over.

codeboten avatar Jul 26 '22 20:07 codeboten

Alex, I would appreciate it if you could take this over. Thank you.

philipcwhite avatar Jul 26 '22 20:07 philipcwhite