Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProbeTCP ¶
func ProbeTCP(ctx context.Context, target string, module config.Module, registry *prometheus.Registry, logger log.Logger) bool
ProbeTCP is a modified version of the blackbox v0.20.0 ProbeTCP. https://github.com/prometheus/blackbox_exporter/blob/v0.20.0/prober/tcp.go
We had to modify this function to fill the verified chains of the TLS connection state by ourselves because it's empty when we set insecure_skip_verify to true.
We also added a way to distinguish TLS errors from TCP errors with the metric "probe_failed_due_to_tls_error".
Types ¶
type RegisterManager ¶
type RegisterManager struct {
// contains filtered or unexported fields
}
RegisterManager is an abstraction that allows us to reload blackbox at runtime, enabling and disabling probes at will.
func New ¶
func New( registry *registry.Registry, config config.Blackbox, metricFormat types.MetricFormat, ) (*RegisterManager, error)
New sets the static part of blackbox configuration (aka. targets that must be scrapped no matter what). This completely resets the configuration.
func (*RegisterManager) DiagnosticArchive ¶
func (m *RegisterManager) DiagnosticArchive(_ context.Context, archive types.ArchiveWriter) error
DiagnosticArchive add diagnostic information.
func (*RegisterManager) UpdateDynamicTargets ¶
func (m *RegisterManager) UpdateDynamicTargets(monitors []types.Monitor) error
UpdateDynamicTargets generates a config we can ingest into blackbox (from the dynamic probes).