Documentation ¶
Overview ¶
Package prober implements a simple blackbox prober. Each probe runs in its own goroutine, and run results are recorded as Prometheus metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Probe ¶
type Probe struct {
// contains filtered or unexported fields
}
Probe is a probe that healthchecks something and updates Prometheus metrics with the results.
type ProbeFunc ¶
ProbeFunc is a function that probes something and reports whether the probe succeeded. The provided context's deadline must be obeyed for correct probe scheduling.
func HTTP ¶
HTTP returns a Probe that healthchecks an HTTP URL.
The ProbeFunc sends a GET request for url, expects an HTTP 200 response, and verifies that want is present in the response body. If the URL is HTTPS, the probe further checks that the TLS certificate is good for at least the next 7 days.