simpleprometheusreceiver

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 16 Imported by: 7

README

Simple Prometheus Receiver

Overview

The prometheus_simple receiver is a wrapper around the prometheus receiver. This receiver provides a simple configuration interface to configure the prometheus receiver to scrape metrics from a single target. Here's an example config.

    receivers:
      prometheus_simple:
        collection_interval: 10s
        use_service_account: true
        endpoint: "172.17.0.5:9153"
        tls_enabled: true
        tls_config:
            ca_file: "/path/to/ca"
            cert_file: "/path/to/cert"
            key_file: "/path/to/key"
            insecure_skip_verify: true
    exporters:
      signalfx:
        access_token: <SIGNALFX_ACCESS_TOKEN>
        url: <SIGNALFX_INGEST_URL>

    service:
      pipelines:
        metrics:
          receivers: [prometheus_simple]
          exporters: [signalfx]
Config
collection_interval

The internal at which metrics should be emitted by this receiver.

default: 10s

endpoint

The endpoint from which prometheus metrics should be scraped.

default: localhost:9090

metrics_path

The path to the metrics endpoint.

default: /metrics

use_service_account

Whether or not to use the Kubernetes Pod service account for authentication.

default: false

tls_enabled

Whether or not to use TLS. Only if tls_enabled is set to true, the values under tls_config are accounted for.

default: false

tls_config

Configure the below options in tls_config.

ca_file

Path to the CA cert that has signed the TLS certificate.

cert_file

Path to the client TLS certificate to use for TLS required connections.

key_file

Path to the client TLS key to use for TLS required connections.

insecure_skip_verify

Whether or not to skip certificate verification.

default: false

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	configmodels.ReceiverSettings `mapstructure:",squash"`

	// CollectionInterval is the interval at which metrics should be collected
	CollectionInterval time.Duration `mapstructure:"collection_interval"`
	// MetricsPath the path to the metrics endpoint.
	MetricsPath string `mapstructure:"metrics_path"`
	// Whether or not to use pod service account to authenticate.
	UseServiceAccount bool `mapstructure:"use_service_account"`
	// contains filtered or unexported fields
}

Config defines configuration for simple prometheus receiver.

type Factory

type Factory struct {
}

Factory is the factory for SignalFx receiver.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() configmodels.Receiver

CreateDefaultConfig creates the default configuration for Jaeger receiver.

func (*Factory) CreateMetricsReceiver

func (f *Factory) CreateMetricsReceiver(
	logger *zap.Logger,
	cfg configmodels.Receiver,
	consumer consumer.MetricsConsumerOld,
) (component.MetricsReceiver, error)

CreateMetricsReceiver creates a metrics receiver based on provided Config.

func (*Factory) CreateTraceReceiver

func (f *Factory) CreateTraceReceiver(
	ctx context.Context,
	logger *zap.Logger,
	cfg configmodels.Receiver,
	consumer consumer.TraceConsumerOld,
) (component.TraceReceiver, error)

CreateTraceReceiver creates a trace receiver based on provided Config.

func (*Factory) CustomUnmarshaler

func (f *Factory) CustomUnmarshaler() component.CustomUnmarshaler

CustomUnmarshaler returns nil because we don't need custom unmarshaling for this Config.

func (*Factory) Type

func (f *Factory) Type() configmodels.Type

Type gets the type of the Receiver Config created by this factory.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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