prometheus

package
v0.52.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 44 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateContent added in v0.50.0

func GenerateContent(promRule monitoringv1.PrometheusRuleSpec, logger log.Logger) (string, error)

GenerateContent takes a PrometheusRuleSpec and generates the rule content

func ListOptions

func ListOptions(name string) metav1.ListOptions

func Status added in v0.47.0

Status evaluates the current status of a Prometheus deployment with respect to its specified resource object. It returns the status and a list of pods that are not updated.

func ValidateRule added in v0.50.0

func ValidateRule(promRule monitoringv1.PrometheusRuleSpec) []error

ValidateRule takes PrometheusRuleSpec and validates it using the upstream prometheus rule validator

func WebConfigSecretName added in v0.49.0

func WebConfigSecretName(name string) string

Types

type ConfigGenerator added in v0.48.0

type ConfigGenerator struct {
	// contains filtered or unexported fields
}

ConfigGenerator is used to create Prometheus configurations from operator resources.

func NewConfigGenerator added in v0.23.0

func NewConfigGenerator(logger log.Logger) *ConfigGenerator

NewConfigGenerator creates a ConfigGenerator instance using the provided Logger.

func (*ConfigGenerator) GenerateConfig added in v0.48.0

func (cg *ConfigGenerator) GenerateConfig(
	p *v1.Prometheus,
	sMons map[string]*v1.ServiceMonitor,
	pMons map[string]*v1.PodMonitor,
	probes map[string]*v1.Probe,
	store *assets.Store,
	additionalScrapeConfigs []byte,
	additionalAlertRelabelConfigs []byte,
	additionalAlertManagerConfigs []byte,
	ruleConfigMapNames []string,
) ([]byte, error)

GenerateConfig creates a serialized YAML representation of a Prometheus configuration using the provided resources.

type Operator

type Operator struct {
	// contains filtered or unexported fields
}

Operator manages life cycle of Prometheus deployments and monitoring configurations.

func New

New creates a new controller.

func (*Operator) Run

func (c *Operator) Run(ctx context.Context) error

Run the controller.

Jump to

Keyboard shortcuts

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