prometheus

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Username      string
	Password      string
	Token         string
	SkipTLSVerify bool
}

type Job

type Job struct {
	Start      time.Time
	End        time.Time
	ChurnStart time.Time
	ChurnEnd   time.Time
	JobConfig  config.Job
}

type Prometheus

type Prometheus struct {
	Client   *prometheus.Prometheus
	Endpoint string

	MetricProfile []metricDefinition
	Step          time.Duration
	UUID          string
	ConfigSpec    config.Spec
	// contains filtered or unexported fields
}

Prometheus describes the prometheus connection

func NewPrometheusClient

func NewPrometheusClient(configSpec config.Spec, url string, auth Auth, step time.Duration, metadata map[string]interface{}, embedConfig bool, indexers ...indexers.Indexer) (*Prometheus, error)

NewPrometheusClient creates a prometheus struct instance with the given parameters

func (*Prometheus) ReadProfile

func (p *Prometheus) ReadProfile(metricsProfile string) error

ReadProfile reads, parses and validates metric profile configuration

func (*Prometheus) ScrapeJobsMetrics

func (p *Prometheus) ScrapeJobsMetrics(jobList ...Job) error

ScrapeJobsMetrics gets all prometheus metrics required and handles them

Jump to

Keyboard shortcuts

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