healthcheckextension

package module
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 13 Imported by: 28

README

Health Check

Status
Stability beta
Distributions contrib

Health Check extension enables an HTTP url that can be probed to check the status of the OpenTelemetry Collector. This extension can be used as a liveness and/or readiness probe on Kubernetes.

There is an optional configuration check_collector_pipeline which allows users to enable health check for the collector pipeline. This feature can monitor the number of times that components failed send data to the destinations. It only supports monitoring exporter failures and will support receivers and processors in the future.

The following settings are required:

  • endpoint (default = 0.0.0.0:13133): Address to publish the health check status. For full list of HTTPServerSettings refer here.
  • path (default = "/"): Specifies the path to be configured for the health check server.
  • check_collector_pipeline: (optional): Settings of collector pipeline health check
    • enabled (default = false): Whether enable collector pipeline check or not
    • interval (default = "5m"): Time interval to check the number of failures
    • exporter_failure_threshold (default = 5): The failure number threshold to mark containers as healthy.

Example:

extensions:
  health_check:
  health_check/1:
    endpoint: "localhost:13"
    tls:
      ca_file: "/path/to/ca.crt"
      cert_file: "/path/to/cert.crt"
      key_file: "/path/to/key.key"
    path: "/health/status"
    check_collector_pipeline:
      enabled: true
      interval: "5m"
      exporter_failure_threshold: 5

The full list of settings exposed for this exporter is documented here with detailed sample configurations here.

Documentation

Overview

Package healthcheckextension implements an extension that enables an HTTP endpoint that can be used to check the overall health and status of the service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ExtensionFactory

NewFactory creates a factory for HealthCheck extension.

Types

type Config

type Config struct {
	config.ExtensionSettings      `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct
	confighttp.HTTPServerSettings `mapstructure:",squash"`

	// Path represents the path the health check service will serve.
	// The default path is "/".
	Path string `mapstructure:"path"`

	// CheckCollectorPipeline contains the list of settings of collector pipeline health check
	CheckCollectorPipeline checkCollectorPipelineSettings `mapstructure:"check_collector_pipeline"`
}

Config has the configuration for the extension enabling the health check extension, used to report the health status of the service.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the extension configuration is valid

Jump to

Keyboard shortcuts

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