Documentation
¶
Overview ¶
Package splunkhecexporter implements an exporter that sends data to Splunk.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶ added in v0.9.0
NewFactory creates a factory for Splunk HEC exporter.
Types ¶
type Config ¶
type Config struct {
confighttp.ClientConfig `mapstructure:",squash"`
QueueSettings configoptional.Optional[exporterhelper.QueueBatchConfig] `mapstructure:"sending_queue"`
configretry.BackOffConfig `mapstructure:"retry_on_failure"`
// DeprecatedBatcher is the deprecated batcher configuration.
DeprecatedBatcher DeprecatedBatchConfig `mapstructure:"batcher"`
// LogDataEnabled can be used to disable sending logs by the exporter.
LogDataEnabled bool `mapstructure:"log_data_enabled"`
// ProfilingDataEnabled can be used to disable sending profiling data by the exporter.
ProfilingDataEnabled bool `mapstructure:"profiling_data_enabled"`
// HEC Token is the authentication token provided by Splunk: https://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector.
Token configopaque.String `mapstructure:"token"`
// Optional Splunk source: https://docs.splunk.com/Splexicon:Source.
// Sources identify the incoming data.
Source string `mapstructure:"source"`
// Optional Splunk source type: https://docs.splunk.com/Splexicon:Sourcetype.
SourceType string `mapstructure:"sourcetype"`
// Splunk index, optional name of the Splunk index.
Index string `mapstructure:"index"`
// Disable GZip compression. Defaults to false.
DisableCompression bool `mapstructure:"disable_compression"`
// Maximum log payload size in bytes. Default value is 2097152 bytes (2MiB).
// Maximum allowed value is 838860800 (~ 800 MB).
MaxContentLengthLogs uint `mapstructure:"max_content_length_logs"`
// Maximum metric payload size in bytes. Default value is 2097152 bytes (2MiB).
// Maximum allowed value is 838860800 (~ 800 MB).
MaxContentLengthMetrics uint `mapstructure:"max_content_length_metrics"`
// Maximum trace payload size in bytes. Default value is 2097152 bytes (2MiB).
// Maximum allowed value is 838860800 (~ 800 MB).
MaxContentLengthTraces uint `mapstructure:"max_content_length_traces"`
// Maximum payload size, raw uncompressed. Default value is 5242880 bytes (5MiB).
// Maximum allowed value is 838860800 (~ 800 MB).
MaxEventSize uint `mapstructure:"max_event_size"`
// App name is used to track telemetry information for Splunk App's using HEC by App name. Defaults to "OpenTelemetry Collector Contrib".
SplunkAppName string `mapstructure:"splunk_app_name"`
// App version is used to track telemetry information for Splunk App's using HEC by App version. Defaults to the current OpenTelemetry Collector Contrib build version.
SplunkAppVersion string `mapstructure:"splunk_app_version"`
// OtelAttrsToHec creates a mapping from attributes to HEC specific metadata: source, sourcetype, index and host.
OtelAttrsToHec translator.HecToOtelAttrs `mapstructure:"otel_attrs_to_hec_metadata"`
// HecFields creates a mapping from attributes to HEC fields.
HecFields translator.OtelToHecFields `mapstructure:"otel_to_hec_fields"`
// HealthPath for health API, default is '/services/collector/health'
HealthPath string `mapstructure:"health_path"`
// HecHealthCheckEnabled can be used to verify Splunk HEC health on exporter's startup
HecHealthCheckEnabled bool `mapstructure:"health_check_enabled"`
// ExportRaw to send only the log's body, targeting a Splunk HEC raw endpoint.
ExportRaw bool `mapstructure:"export_raw"`
// UseMultiMetricFormat combines metric events to save space during ingestion.
UseMultiMetricFormat bool `mapstructure:"use_multi_metric_format"`
// Heartbeat is the configuration to enable heartbeat
Heartbeat HecHeartbeat `mapstructure:"heartbeat"`
// Telemetry is the configuration for splunk hec exporter telemetry
Telemetry HecTelemetry `mapstructure:"telemetry"`
}
Config defines configuration for Splunk exporter.
type DeprecatedBatchConfig ¶ added in v0.130.0
type DeprecatedBatchConfig struct {
Enabled bool `mapstructure:"enabled"`
FlushTimeout time.Duration `mapstructure:"flush_timeout"`
Sizer exporterhelper.RequestSizerType `mapstructure:"sizer"`
MinSize int64 `mapstructure:"min_size"`
MaxSize int64 `mapstructure:"max_size"`
// contains filtered or unexported fields
}
type HecHeartbeat ¶ added in v0.76.1
type HecHeartbeat struct {
// Interval represents the time interval for the heartbeat interval. If nothing or 0 is set,
// heartbeat is not enabled.
// A heartbeat is an event sent to _internal index with metadata for the current collector/host.
Interval time.Duration `mapstructure:"interval"`
// Startup is used to send heartbeat events on exporter's startup.
Startup bool `mapstructure:"startup"`
}
HecHeartbeat defines the heartbeat information for the exporter
type HecTelemetry ¶ added in v0.76.1
type HecTelemetry struct {
// Enabled is the bool to enable telemetry inside splunk hec exporter
Enabled bool `mapstructure:"enabled"`
// OverrideMetricsNames is the map to override metrics for internal metrics in splunk hec exporter
OverrideMetricsNames map[string]string `mapstructure:"override_metrics_names"`
// ExtraAttributes is the extra attributes for metrics inside splunk hex exporter
ExtraAttributes map[string]string `mapstructure:"extra_attributes"`
}
HecTelemetry defines the telemetry configuration for the exporter
Source Files
¶
Click to show internal directories.
Click to hide internal directories.