exporter

package
v0.3.1-0...-a38ed93 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchJson

func FetchJson(ctx context.Context, logger log.Logger, endpoint string, c config.Config, tplValues url.Values) ([]byte, error)

func MakeMetricName

func MakeMetricName(parts ...string) string

func SanitizeValue

func SanitizeValue(s string) (float64, error)

Types

type JsonMetric

type JsonMetric struct {
	Desc            *prometheus.Desc
	KeyJsonPath     string
	ValueJsonPath   string
	LabelsJsonPaths []string
}

func CreateMetricsList

func CreateMetricsList(c config.Config) ([]JsonMetric, error)

type JsonMetricCollector

type JsonMetricCollector struct {
	JsonMetrics []JsonMetric
	Data        []byte
	Logger      log.Logger
}

func (JsonMetricCollector) Collect

func (mc JsonMetricCollector) Collect(ch chan<- prometheus.Metric)

func (JsonMetricCollector) Describe

func (mc JsonMetricCollector) Describe(ch chan<- *prometheus.Desc)

Jump to

Keyboard shortcuts

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