slzebriumexporter

package module
v0.0.0-...-33a10e0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

README

ScienceLogic Zebrium Exporter

Status
Stability beta
Supported pipeline types logs
Distributions contrib

Exports data via HTTP to Zebrium

Getting Started

The following settings are required:

  • endpoint (no default): The target URL to send Zebrium log streams to (e.g.: https://cloud.zebrium.com).
  • ze_token (no default): Authorization token for the Zebrium deployment

Optional settings:

  • verbosity (default 'normal'): Use 'detailed' to log all incoming log records

The ScienceLogic Zebrium Exporter relies on the ScienceLogic Log Format Processor to populate the following attributes:

  • sl_metadata: Resource attribute with encoded metadata that identifies logs from a single application instance
  • sl_msg: Log record attribute with the body of the log message formated for ScienceLogic
  • sl_format: Format option from the matching profile, e.g. event

The following example shows how to configure the format processor and exporter in a pipeline:

receivers:
  windowseventlog:
    channel: application
    start_at: end

processors:
  sllogformat:
    send_batch_size: 10000
    timeout: 10s
    profiles:
    - service_group: # windows event log
        exp:
          source: lit:default
        rename: ze_deployment_name
      host:
        exp:
          source: body:computer
        rename: host
      logbasename:
        exp:
          op: lc
          exps:
          - op: alphanum
            exps:
              - op: rmprefix
                exps:
                  - source: body:provider.name
                  - source: lit:Microsoft-Windows-
        rename: logbasename
      message:
        exp:
          op: or
          exps:
            - source: body:message
            - source: body:event_data
            - source: body:keywords
      format: event

exporters:
  slzebrium:
    verbosity: detailed
    endpoint: https://cloud.zebrium.com
    ze_token: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

service:
  pipelines:
    logs:
      receivers: [windowseventlog]
      processors: [sllogformat]
      exporters: [slzebrium]

Advanced Configuration

Several helper files are leveraged to provide additional capabilities automatically:

Documentation

Overview

Package slzebriumexporter exports data to console as logs.

Index

Constants

View Source
const (
	CfgFormatMessage   string = "message"
	CfgFormatContainer string = "container"
	CfgFormatEvent     string = "event"
)

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() exporter.Factory

NewFactory creates a factory for Logging exporter

Types

type Config

type Config struct {
	confighttp.ClientConfig      `mapstructure:",squash"`
	exporterhelper.QueueSettings `mapstructure:"sending_queue"`
	configretry.BackOffConfig    `mapstructure:"retry_on_failure"`

	// Verbosity defines the zebrium exporter verbosity.
	Verbosity configtelemetry.Level `mapstructure:"verbosity"`

	// ZeUrl Zebrium ZAPI authentication token
	ZeToken string `mapstructure:"ze_token"`
}

Config defines configuration for slzebrium exporter.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the exporter configuration is valid

Jump to

Keyboard shortcuts

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