splunkhecreceiver

package module
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 25 Imported by: 10

README

Splunk HEC Receiver

The Splunk HEC receiver accepts metrics in the Splunk HEC format. This allows the collector to receive metrics, traces and logs.

Supported pipeline types: logs, metrics, traces

🚧 This receiver is in beta and configuration fields are subject to change.

Configuration

The following settings are required:

  • endpoint (default = 0.0.0.0:8088): Address and port that the Splunk HEC receiver should bind to.

The following settings are optional:

  • access_token_passthrough (default = false): Whether to preserve incoming access token (Splunk header value) as "com.splunk.hec.access_token" metric resource label. Can be used in tandem with identical configuration option for Splunk HEC exporter to preserve datapoint origin.
  • tls_settings (no default): This is an optional object used to specify if TLS should be used for incoming connections.
    • cert_file: Specifies the certificate file to use for TLS connection. Note: Both key_file and cert_file are required for TLS connection.
    • key_file: Specifies the key file to use for TLS connection. Note: Both key_file and cert_file are required for TLS connection.
  • path (default = '/*): The path to listen on, as a glob expression. Example:
receivers:
  splunk_hec:
  splunk_hec/advanced:
    access_token_passthrough: true
    tls:
      cert_file: /test.crt
      key_file: /test.key
    path: "/myhecreceiver"

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

Documentation

Overview

Package splunkhecreceiver implements a receiver that can be used by the OpenTelemetry collector to receive data in the Splunk HEC supported formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ReceiverFactory

NewFactory creates a factory for SignalFx receiver.

func NewLogsReceiver added in v0.14.0

func NewLogsReceiver(
	logger *zap.Logger,
	config Config,
	nextConsumer consumer.Logs,
) (component.LogsReceiver, error)

NewLogsReceiver creates the Splunk HEC receiver with the given configuration.

func NewMetricsReceiver added in v0.14.0

func NewMetricsReceiver(
	logger *zap.Logger,
	config Config,
	nextConsumer consumer.Metrics,
) (component.MetricsReceiver, error)

NewMetricsReceiver creates the Splunk HEC receiver with the given configuration.

func SplunkHecToLogData added in v0.13.0

func SplunkHecToLogData(logger *zap.Logger, events []*splunk.Event, resourceCustomizer func(pdata.Resource)) (pdata.Logs, error)

SplunkHecToLogData transforms splunk events into logs

func SplunkHecToMetricsData added in v0.14.0

func SplunkHecToMetricsData(logger *zap.Logger, events []*splunk.Event, resourceCustomizer func(pdata.Resource)) (pdata.Metrics, int)

SplunkHecToMetricsData converts Splunk HEC metric points to pdata.Metrics. Returning the converted data and the number of dropped time series.

Types

type Config

type Config struct {
	config.ReceiverSettings       `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct
	confighttp.HTTPServerSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct

	splunk.AccessTokenPassthroughConfig `mapstructure:",squash"`
	// Path we will listen on, defaults to `*` (anything matches)
	Path string `mapstructure:"path"`
	// contains filtered or unexported fields
}

Config defines configuration for the SignalFx receiver.

Jump to

Keyboard shortcuts

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