awsprometheusremotewriteexporter

package module
v0.57.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 21 Imported by: 1

README

DEPRECATION NOTICE

Status
Stability deprecated
Supported pipeline types metrics
Distributions contrib

The AWS Prometheus Remote Write Exporter will be removed at some point after v0.49.0. Users who want to send metrics to Amazon Managed Service for Prometheus will need to instead use the Prometheus Remote Write Exporter along with the Sigv4 Authenticator Extension to achieve the same result.

AWS Prometheus Remote Write Exporter

AWS Prometheus Remote Write Exporter sends metrics in remote write format to Amazon Managed Service for Prometheus. The exporter uses AWS Signature Version 4 signing process for authentication and uses credentials from the default credential chain.

Note: This exporter is similar to Prometheus remote write exporter and it only adds SigV4 support to it.

Similar to the Prometheus remote write exporter, the exporter checks the temporality and the type of each incoming metric and only exports the following combination:

  • Int64 or Double type with any temporality
  • MonotonicInt64, MonotonicDouble, Histogram, or Summary with only Cumulative temporality.

Configuration

The following settings are required:

  • endpoint: protocol:host:port to which the exporter is going to send traces or metrics, using the HTTP/HTTPS protocol.

The following settings can be optionally configured:

  • namespace: prefix attached to each exported metric name.
  • headers: additional headers attached to each HTTP request. If X-Prometheus-Remote-Write-Version is set by user, its value must be 0.1.0
  • tls:
    • insecure (default = false): whether to enable client transport security for the exporter's connection.
    • ca_file: path to the CA cert. For a client this verifies the server certificate. Should only be used if insecure is set to true.
    • cert_file: path to the TLS cert to use for TLS required connections. Should only be used if insecure is set to true.
    • key_file: path to the TLS key to use for TLS required connections. Should only be used if insecure is set to true.
  • timeout (default = 5s): How long to wait until the connection is close.
  • read_buffer_size (default = 0): ReadBufferSize for HTTP client.
  • write_buffer_size (default = 512 * 1024): WriteBufferSize for HTTP client.
  • aws_auth: specify if each request should be signed with AWS Sig v4. The following settings must be configured:
    • region: region of the AWS service being exported to.
    • role_arn: Amazon Resource Name of the role to assume.

Examples

Simplest configuration:

exporters:
  awsprometheusremotewrite:
    endpoint: "https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-XXX/api/v1/remote_write"

All configurations:

exporters:
  awsprometheusremotewrite:
    namespace: "test-space"
    retry_on_failure:
        enabled: true
        initial_interval: 10s
        max_interval: 60s
        max_elapsed_time: 10m
    endpoint: "https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-XXX/api/v1/remote_write"
    aws_auth:
        region: "us-east-1" # need to match workspace region
        service: "aps"
        role_arn: "arn:aws:iam::123456789012:role/aws-service-role/access"
    ca_file: "/var/lib/mycert.pem"
    write_buffer_size: 524288
    external_labels:
        key1: value1
        key2: value2

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

Documentation

Overview

Package awsprometheusremotewriteexporter provides a Prometheus Remote Write Exporter with AWS Sigv4 authentication

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ExporterFactory

NewFactory returns a factory of the AWS Prometheus Remote Write exporter that can be registered to the Collector.

Types

type AuthConfig

type AuthConfig struct {
	// Region is the AWS region for AWS SigV4.
	Region string `mapstructure:"region"`

	// Service is the AWS service for AWS SigV4, this is by default "aps". Optional.
	Service string `mapstructure:"service"`

	// Amazon Resource Name (ARN) of a role to assume. Optional.
	RoleArn string `mapstructure:"role_arn"`
}

AuthConfig defines AWS authentication configurations for SigningRoundTripper.

type Config

type Config struct {
	// Config represents the Prometheus Remote Write Exporter configuration.
	prw.Config `mapstructure:",squash"`

	// AuthConfig represents the AWS SigV4 configuration options.
	AuthConfig AuthConfig `mapstructure:"aws_auth"`
}

Config defines configuration for Remote Write exporter.

Jump to

Keyboard shortcuts

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