filereceiver

package module
v0.94.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

README

File Receiver

Status
Stability development: metrics
Distributions contrib
Issues Open issues Closed issues
Code Owners @djaglowski
Emeritus @pmcollins

The File Receiver reads the output of a File Exporter, converting that output to metrics, and sending the metrics down the pipeline.

Currently, the only file format supported is the File Exporter's JSON format. Reading compressed output, rotated files, or telemetry other than metrics are not supported at this time.

Getting Started

The following setting is required:

  • path [no default]: the file in the same format as written by a File Exporter.

The following setting is optional:

  • throttle [default: 1]: a determines how fast telemetry is replayed. A value of 0 means that it will be replayed as fast as the system will allow. A value of 1 means that it will be replayed at the same rate as the data came in, as indicated by the timestamps on the input file's telemetry data. Higher values mean that the replay speed will be slower by a multiple of the throttle value. Values can be decimals, e.g. 0.5 means that telemetry will be replayed at 2x the rate indicated by the telemetry's timestamps.

Example

receivers:
  file:
    path: my-telemetry-file
    throttle: 0.5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

Types

type Config

type Config struct {
	// Path of the file to read from. Path is relative to current directory.
	Path string `mapstructure:"path"`
	// Throttle determines how fast telemetry is replayed. A value of zero means
	// that it will be replayed as fast as the system will allow. A value of 1 means
	// that it will be replayed at the same rate as the data came in, as indicated
	// by the timestamps on the input file's telemetry data. Higher values mean that
	// replay will be slower by a corresponding amount. Use a value between 0 and 1
	// to replay telemetry at a higher speed. Default: 1.
	Throttle float64 `mapstructure:"throttle"`
}

Config defines the configuration for the file receiver.

func (Config) Validate

func (c Config) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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