sematextexporter

package module
v0.163.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

README

Sematext Exporter

Status
Stability development: metrics, logs
Distributions []
Issues Open issues Closed issues
Code coverage codecov
Code Owners @AkhigbeEromo

This exporter supports sending metrics to Sematext Cloud in Influx line protocol format and logs using the Bulk Index Api format.

Configuration

The following configuration options are supported:

  • timeout (default = 5s) Timeout for requests
  • sending_queue details here
    • enabled (default = true)
    • num_consumers (default = 10) The number of consumers from the queue
    • queue_size (default = 1000) Maximum number of batches allowed in queue at a given time
  • retry_on_failure details here
    • enabled (default = true)
    • initial_interval (default = 5s) Time to wait after the first failure before retrying
    • max_interval (default = 30s) Upper bound on backoff interval
    • max_elapsed_time (default = 120s) Maximum amount of time (including retries) spent trying to send a request/batch
  • region (required) Region specifies the Sematext region the user is operating in; must be one of:
    • US
    • EU
  • metrics.app_token (required if sending metrics) Token of the Sematext Monitoring App to which metrics data will be sent. Must be a valid UUID string in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. For example: 2046e37c-4fac-45f6-831d-922d43fde759.
  • metrics.payload_max_lines (default = 1_000) Maximum number of lines allowed per HTTP POST request
  • metrics.payload_max_bytes (default = 300_000) Maximum number of bytes allowed per HTTP POST request
  • logs.app_token (required if sending logs) Token of the Sematext Logs App to which logs data will be sent. Must be a valid UUID string in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. For example: 6272eba4-b878-4606-aaef-6b11b9fa5810. Note: At least one of metrics.app_token or logs.app_token must be provided.

The full list of settings exposed for this exporter are documented in config.go.

Example:

timeout: 500ms
sending_queue:
  enabled: true
  num_consumers: 3
  queue_size: 10
retry_on_failure:
  enabled: true
  initial_interval: 1s
  max_interval: 3s
  max_elapsed_time: 10s
region: US  
metrics:
  app_token: 2064e37c-4fac-45f6-831d-922d43fde759
  payload_max_lines: 100
  payload_max_bytes: 1000
logs:
  app_token: 6272eba4-b878-4606-aaef-6b11b9fa5810

Documentation

Overview

Package sematextexporter sends metrics and logs to sematext cloud.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() exporter.Factory

NewFactory creates a factory for the Sematext metrics exporter.

Types

type Config

type Config struct {
	ClientConfig  confighttp.ClientConfig                                  `mapstructure:",squash"`
	BackOffConfig configretry.BackOffConfig                                `mapstructure:"retry_on_failure"`
	QueueSettings configoptional.Optional[exporterhelper.QueueBatchConfig] `mapstructure:"sending_queue"`
	// Region specifies the Sematext region the user is operating in
	// Options:
	// - EU
	// - US
	Region string `mapstructure:"region"`
	// MetricsConfig defines the configuration specific to metrics
	MetricsConfig MetricsConfig `mapstructure:"metrics"`
	// LogsConfig defines the configuration specific to logs
	LogsConfig LogsConfig `mapstructure:"logs"`
}

func (*Config) Validate added in v0.122.0

func (cfg *Config) Validate() error

Validate checks for invalid or missing entries in the configuration.

type LogsConfig added in v0.125.0

type LogsConfig struct {
	// App token is the token of Sematext Monitoring App to which you want to send the logs.
	AppToken string `mapstructure:"app_token"`
	// LogsEndpoint specifies the endpoint for receiving logs in Sematext
	LogsEndpoint string `mapstructure:"-"`
}

type MetricsConfig added in v0.122.0

type MetricsConfig struct {
	// App token is the token of Sematext Monitoring App to which you want to send the metrics.
	AppToken string `mapstructure:"app_token"`
	// MetricsEndpoint specifies the endpoint for receiving metrics in Sematext
	MetricsEndpoint string `mapstructure:"-"`
	// MetricsSchema indicates the metrics schema to emit to line protocol.
	// Default: telegraf-prometheus-v2
	MetricsSchema string `mapstructure:"-"`
	// PayloadMaxLines is the maximum number of line protocol lines to POST in a single request.
	PayloadMaxLines int `mapstructure:"payload_max_lines"`
	// PayloadMaxBytes is the maximum number of line protocol bytes to POST in a single request.
	PayloadMaxBytes int `mapstructure:"payload_max_bytes"`
}

Directories

Path Synopsis
internal
metadata
Package metadata contains the autogenerated telemetry and build information for the exporter/sematext component.
Package metadata contains the autogenerated telemetry and build information for the exporter/sematext component.

Jump to

Keyboard shortcuts

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