tlscheckreceiver

package module
v0.125.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

README

TLS Check Receiver

Status
Stability alpha: metrics
Distributions contrib
Issues Open issues Closed issues
Code Owners @atoulme, @michael-burt

Emit metrics about x.509 certificates.

Getting Started

By default, the TLS Check Receiver will emit a single metric, tlscheck.time_left, per target. This is measured in seconds until the date and time specified in the NotAfter field of the x.509 certificate. After certificate expiration, the metric value will be a negative integer measuring the time in seconds since expiry.

Example Configuration

Targets are configured as either remote enpoints accessed via TCP, or PEM-encoded certificate files stored locally on disk.

receivers:
  tlscheck:
    targets:
      # Monitor a local PEM file
      - file_path: /etc/istio/certs/cert-chain.pem
      
      # Monitor a remote endpoint
      - endpoint: example.com:443
      
      # Monitor a local service with a custom timeout
      - endpoint: localhost:10901
        dialer: 
          timeout: 15s

Certificate Verification

This component does not provide hostname, validity period, path, or CRL / OCSP verification on the certificate.

Metrics

Details about the metrics produced by this receiver can be found in metadata.yaml.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

Types

type CertificateTarget added in v0.123.0

type CertificateTarget struct {
	confignet.TCPAddrConfig `mapstructure:",squash"`
	FilePath                string `mapstructure:"file_path"`
}

CertificateTarget represents a target for certificate checking, which can be either a network endpoint or a local file

type Config

type Config struct {
	scraperhelper.ControllerConfig `mapstructure:",squash"`
	metadata.MetricsBuilderConfig  `mapstructure:",squash"`
	Targets                        []*CertificateTarget `mapstructure:"targets"`
}

Config defines the configuration for the various elements of the receiver agent.

func (*Config) Validate

func (cfg *Config) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
OSZAR »