signalfxexporter

package module
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 30 Imported by: 10

README

SignalFx Metrics Exporter

This exporter can be used to send metrics and events to SignalFx.

Apart from metrics, the exporter is also capable of sending metric metadata (properties and tags) to SignalFx. Currently, only metric metadata updates from the k8s_cluster receiver are supported.

Supported pipeline types: logs (events), metrics

Configuration

The following configuration options are required:

  • access_token (no default): The access token is the authentication token provided by SignalFx.
  • Either realm or both api_url and ingest_url. Both api_url and ingest_url take precedence over realm.
    • realm (no default): SignalFx realm where the data will be received.
    • api_url (no default): Destination to which SignalFx properties and tags are sent. If realm is set, this option is derived and will be https://api.{realm}.signalfx.com/. If a value is explicitly set, the value of realm will not be used in determining api_url. The explicit value will be used instead.
    • ingest_url (no default): Destination where SignalFx metrics are sent. If realm is set, this option is derived and will be https://ingest.{realm}.signalfx.com/v2/datapoint. If a value is explicitly set, the value of realm will not be used in determining ingest_url. The explicit value will be used instead. If path is not specified, /v2/datapoint is used.

The following configuration options can also be configured:

  • access_token_passthrough: (default = true) Whether to use "com.splunk.signalfx.access_token" metric resource label, if any, as the SignalFx access token. In either case this label will be dropped during final translation. Intended to be used in tandem with identical configuration option for SignalFx receiver to preserve datapoint origin.
  • exclude_metrics: metric names that will be excluded from sending to Signalfx backend. If send_compatible_metrics or translation_rules options are enabled, the exclusion will be applied on translated metrics.
  • headers (no default): Headers to pass in the payload.
  • log_dimension_updates (default = false): Whether or not to log dimension updates.
  • send_compatible_metrics (default = false): Whether metrics must be translated to a format backward-compatible with SignalFx naming conventions.
  • timeout (default = 5s): Amount of time to wait for a send operation to complete.
  • translation_rules: Set of rules on how to translate metrics to a SignalFx compatible format. Rules defined in translation/constants.go are used by default. Applicable only when send_compatible_metrics set to true.
  • sync_host_metadata: Defines whether the exporter should scrape host metadata and send it as property updates to SignalFx backend. Disabled by default. IMPORTANT: Host metadata synchronization relies on resourcedetection processor. If this option is enabled make sure that resourcedetection processor is enabled in the pipeline with one of the cloud provider detectors or environment variable detector setting a unique value to host.name attribute within your k8s cluster. And keep override=true in resourcedetection config.

In addition, this exporter offers queued retry which is enabled by default. Information about queued retry configuration parameters can be found here.

Example:

exporters:
  signalfx:
    access_token: <replace_with_actual_access_token>
    access_token_passthrough: true
    headers:
      added-entry: "added value"
      dot.test: test
    realm: us1
    timeout: 5s

⚠ When enabling the SignalFx receiver or exporter, configure both the metrics and logs pipelines.

service:
  pipelines:
    metrics:
      receivers: [signalfx]
      processors: [memory_limiter, batch]
      exporters: [signalfx]
    logs:
      receivers: [signalfx]
      processors: [memory_limiter, batch]
      exporters: [signalfx]

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

This exporter also offers proxy support as documented here.

Documentation

Overview

Package signalfxexporter implements an exporter that sends data to SignalFx.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory added in v0.9.0

func NewFactory() component.ExporterFactory

NewFactory creates a factory for SignalFx exporter.

Types

type Config

type Config struct {
	configmodels.ExporterSettings  `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
	exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
	exporterhelper.QueueSettings   `mapstructure:"sending_queue"`
	exporterhelper.RetrySettings   `mapstructure:"retry_on_failure"`

	// AccessToken is the authentication token provided by SignalFx.
	AccessToken string `mapstructure:"access_token"`

	// Realm is the SignalFx realm where data is going to be sent to.
	Realm string `mapstructure:"realm"`

	// IngestURL is the destination to where SignalFx metrics will be sent to, it is
	// intended for tests and debugging. The value of Realm is ignored if the
	// URL is specified. If a path is not included the exporter will
	// automatically append the appropriate path, eg.: "v2/datapoint".
	// If a path is specified it will act as a prefix.
	IngestURL string `mapstructure:"ingest_url"`

	// APIURL is the destination to where SignalFx metadata will be sent. This
	// value takes precedence over the value of Realm
	APIURL string `mapstructure:"api_url"`

	// Headers are a set of headers to be added to the HTTP request sending
	// trace data. These can override pre-defined header values used by the
	// exporter, eg: "User-Agent" can be set to a custom value if specified
	// here.
	Headers map[string]string `mapstructure:"headers"`

	// Whether to log dimension updates being sent to SignalFx.
	LogDimensionUpdates bool `mapstructure:"log_dimension_updates"`

	splunk.AccessTokenPassthroughConfig `mapstructure:",squash"`

	// SendCompatibleMetrics specifies if metrics must be sent in a format backward-compatible with
	// SignalFx naming conventions, "false" by default.
	SendCompatibleMetrics bool `mapstructure:"send_compatible_metrics"`

	// TranslationRules defines a set of rules how to translate metrics to a SignalFx compatible format
	// Rules defined in translation/constants.go are used by default.
	TranslationRules []translation.Rule `mapstructure:"translation_rules"`

	// DeltaTranslationTTL specifies in seconds the max duration to keep the most recent datapoint for any
	// `delta_metric` specified in TranslationRules. Default is 3600s.
	DeltaTranslationTTL int64 `mapstructure:"delta_translation_ttl"`

	// SyncHostMetadata defines if the exporter should scrape host metadata and
	// sends it as property updates to SignalFx backend.
	// IMPORTANT: Host metadata synchronization relies on `resourcedetection` processor.
	//            If this option is enabled make sure that `resourcedetection` processor
	//            is enabled in the pipeline with one of the cloud provider detectors
	//            or environment variable detector setting a unique value to
	//            `host.name` attribute within your k8s cluster. Also keep override
	//            And keep `override=true` in resourcedetection config.
	SyncHostMetadata bool `mapstructure:"sync_host_metadata"`

	// ExcludeMetrics defines metrics that will be excluded from sending to Signalfx
	// backend. If translations enabled with SendCompatibleMetrics or TranslationRules
	// options, the exclusion will be applied on translated metrics.
	ExcludeMetrics []string `mapstructure:"exclude_metrics"`
}

Config defines configuration for SignalFx exporter.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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