solarwindsexporter

package module
v0.0.0-...-fea2ebb Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

README

Solarwinds Exporter

Status
Stability development: traces, metrics, logs
Distributions []
Issues Open issues Closed issues

SolarWinds Exporter is a convenience wrapper around OTLP gRPC Exporter to transport your telemetry to SolarWinds Observability SaaS in an easy-to-configure manner.

Getting Started

You just need to include the SolarWinds Exporter in your exporter definitions and no additional configuration is needed. It always needs to be used together with the Solarwinds Extension.

exporters:
  solarwinds:
extensions:
  solarwinds:
    token: "TOKEN"
    data_center: "na-01"

Full configuration

Example with Defaults
exporters:
  solarwinds:
    extension: "solarwinds"
    timeout: "10s"
    sending_queue:
      enabled: true
      num_consumers: 10
      queue_size: 1000
    retry_on_failure:
      enabled: true
      initial_interval: "5s"
      randomization_factor: 0.5
      multiplier: 1.5
      max_interval: "30s"
      max_elapsed_time: "300s"
extensions:
  solarwinds:
    token: "TOKEN"
    data_center: "na-01"

[!TIP]
You can omit extension from the Solarwinds Exporter configuration above if there's only a single instance of the Solarwinds Extension.

  • extension (optional) - This name identifies an instance of the Solarwinds Extension to be used by this exporter to obtain its configuration. If there is only a single instance of the extension, the configuration value is optional. The format mimics the identifier as it occurs in the collector configuration - type/name, e.g solarwinds or solarwinds/1 for multiple instances of the extension. You would use multiple instances for publishing your telemetry to multiple SolarWinds Observability SaaS organizations.
  • timeout (optional) - Timeout for each attempt to send data to the SaaS service. A timeout of zero disables the timeout. The default is 10s.
  • retry_on_failure (optional) - These options configure the retry behavior. Please refer to the Exporter Helper documentation.
  • sending_queue (optional) - These are the options to set queuing in the exporter. A full descriptions can be similarly found in Exporter Helper documentation.

[!NOTE]
The format of all durations above follow the time.ParseDuration format of "Duration" strings.

Example with Multiple Solarwinds Extensions
exporters:
  solarwinds:
    extension: "solarwinds/1"
extensions:
  solarwinds/1:
    token: YOUR-INGESTION-TOKEN1"
    data_center: "na-01"
  solarwinds/2:
    token: YOUR-INGESTION-TOKEN2"
    data_center: "na-02"

[!WARNING] The extension configuration value cannot be omitted in the example above. There are multiple instances of the Solarwinds Extension and you need to configure which instance to use to obtain configuration for the exporter.

Development

  • Tests can be executed with make test.
  • After changes to metadata.yaml generated files need to be re-generated with make generate. The mdatagen tool has to be in the PATH.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSwiExtensionNotFound = errors.New("solarwinds extension not found")
)

Functions

func NewDefaultConfig

func NewDefaultConfig() component.Config

NewDefaultConfig creates a new default configuration.

func NewFactory

func NewFactory() exporter.Factory

NewFactory creates a factory for Solarwinds Exporter.

Types

type Config

type Config struct {
	// Extension identifies a Solarwinds Extension to
	// use for obtaining connection credentials in this exporter.
	Extension string `mapstructure:"extension"`
	// BackoffSettings configures retry behavior of the exporter.
	// See [configretry.BackOffConfig] documentation.
	BackoffSettings configretry.BackOffConfig `mapstructure:"retry_on_failure"`
	// QueueSettings defines configuration for queueing batches in the OTLP Exporter.
	// See [exporterhelper.QueueConfig] documentation.
	QueueSettings exporterhelper.QueueConfig `mapstructure:"sending_queue"`
	// Timeout configures timeout in the underlying OTLP exporter.
	Timeout exporterhelper.TimeoutConfig `mapstructure:"timeout,squash"`
	// contains filtered or unexported fields
}

Config represents a Solarwinds Exporter configuration.

func (*Config) OTLPConfig

func (cfg *Config) OTLPConfig() (*otlpexporter.Config, error)

OTLPConfig generates a full OTLP Exporter configuration from the configuration.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks the configuration for its validity.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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