exporter

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeMetricName

func MakeMetricName(parts ...string) string

func SanitizeIntValue added in v0.6.0

func SanitizeIntValue(s string) (int64, error)

func SanitizeValue

func SanitizeValue(s string) (float64, error)

Types

type JSONFetcher added in v0.4.0

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

func NewJSONFetcher added in v0.4.0

func NewJSONFetcher(ctx context.Context, logger log.Logger, m config.Module, tplValues url.Values) *JSONFetcher

func (*JSONFetcher) FetchJSON added in v0.4.0

func (f *JSONFetcher) FetchJSON(endpoint string) ([]byte, error)

type JSONMetric added in v0.4.0

type JSONMetric struct {
	Desc                   *prometheus.Desc
	Type                   config.ScrapeType
	KeyJSONPath            string
	ValueJSONPath          string
	LabelsJSONPaths        []string
	ValueType              prometheus.ValueType
	EpochTimestampJSONPath string
}

func CreateMetricsList

func CreateMetricsList(c config.Module) ([]JSONMetric, error)

type JSONMetricCollector added in v0.4.0

type JSONMetricCollector struct {
	JSONMetrics []JSONMetric
	Data        []byte
	Logger      log.Logger
}

func (JSONMetricCollector) Collect added in v0.4.0

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

func (JSONMetricCollector) Describe added in v0.4.0

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