prometheus

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureScrapeConfig

func EnsureScrapeConfig(configFile string, sc ScrapeConfig) error

func Reload

func Reload(ctx context.Context, promUrl string) error

func RemoveScrapeConfig

func RemoveScrapeConfig(configFile string, jobName string) error

Types

type Config

type Config struct {
	ScrapeConfigs []ScrapeConfig `yaml:"scrape_configs,omitempty"`
}

type ScrapeConfig

type ScrapeConfig struct {
	JobName        string         `yaml:"job_name,omitempty"`
	ScrapeInterval string         `yaml:"scrape_interval,omitempty"`
	BearerToken    string         `yaml:"bearer_token,omitempty"` //nolint:gosec // Field has to be exported for the decoder.
	TlsConfig      TLSConfig      `yaml:"tls_config,omitempty"`
	Scheme         string         `yaml:"scheme,omitempty"`
	StaticConfigs  []StaticConfig `yaml:"static_configs,omitempty"`
}

type StaticConfig

type StaticConfig struct {
	Targets []string          `yaml:"targets,omitempty"`
	Labels  map[string]string `yaml:"labels,omitempty"`
}

type TLSConfig

type TLSConfig struct {
	InsecureSkipVerify bool   `yaml:"insecure_skip_verify,omitempty"`
	CaFile             string `yaml:"ca_file,omitempty"`
}

Jump to

Keyboard shortcuts

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