Synthetic Monitoring
Synthetic Monitoring for HTTP/HTTPS Endpoints
3 min
the http check receiver enables synthetic monitoring of http and https endpoints by sending requests to the specified endpoint using the configured method at configurable intervals it reports detailed availability and performance metrics for these endpoints key use cases perform api and health checks on arbitrary http(s) endpoints track detailed metrics including time spent sending the http request to the endpoint time spent establishing the tcp connection to the endpoint time spent performing a dns lookup for the endpoint time remaining until tls certificate expiry (for https) response time and success or failure status for official metric definitions, see the opentelemetry httpcheckreceiver documentation configuration example add the following httpcheck receiver configuration to your opentelemetry collector or agent's config yaml and add the following section under the receiver block receivers httpcheck collection interval 30s \# optional enable timing breakdown metrics metrics httpcheck dns lookup duration enabled true httpcheck client connection duration enabled true httpcheck tls handshake duration enabled true httpcheck client request duration enabled true httpcheck response duration enabled true httpcheck tls cert remaining enabled true httpcheck validation passed enabled true httpcheck validation failed enabled true httpcheck response size enabled true targets \ method "get" endpoints \ "https //opentelemetry io" # change the endpoints accordingly \ method "get" endpoints \ "http //localhost 8080/hello1" \ "http //localhost 8080/hello2" headers authorization "bearer \<your bearer token>" \ method "get" endpoint "http //localhost 8080/hello" headers authorization "bearer \<your bearer token>" \ method "post" endpoint "https //api example com/users" body '{"name" "test user", "email" "test\@example com"}' processors batch send batch max size 1000 send batch size 100 timeout 10s exporters debug verbosity detailed otlphttp endpoint "https //otel kloudmate com 4318" headers authorization "\<api key>" service pipelines metrics receivers \[httpcheck] processors \[batch] exporters \[debug] update endpoints, http methods, and any authentication headers to match your specific application requirements