prometheusexporter

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

README

Prometheus Exporter

Exports metric data to a Prometheus back-end.

The following settings are required:

  • endpoint (no default): Where to send metric data

The following settings can be optionally configured:

  • constlabels (no default): key/values that are applied for every exported metric.
  • namespace (no default): if set, exports metrics under the provided value.

Example:

exporters:
  prometheus:
    endpoint: "1.2.3.4:1234"
    namespace: test-space
    const_labels:
      label1: value1
      "another label": spaced value

The full list of settings exposed for this exporter are documented here with detailed sample configurations here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory added in v0.8.0

func NewFactory() component.ExporterFactory

NewFactory creates a factory for OTLP exporter.

Types

type Config

type Config struct {
	configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.

	// The address on which the Prometheus scrape handler will be run on.
	Endpoint string `mapstructure:"endpoint"`

	// Namespace if set, exports metrics under the provided value.
	Namespace string `mapstructure:"namespace"`

	// ConstLabels are values that are applied for every exported metric.
	ConstLabels prometheus.Labels `mapstructure:"const_labels"`
}

Config defines configuration for Prometheus exporter.

Jump to

Keyboard shortcuts

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