destination

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricPrometheusStoreSize = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "prom_store_size",
			Help: "size of the Prometheus metric store",
		},
		[]string{"store"},
	)
	MetricPrometheusStoreGCSeconds = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "prom_store_gc_seconds",
			Help:    "Seconds and count of metric store GC job",
			Buckets: []float64{0, .0001, .00025, .0005, .00075, .001, .0025, .005, .0075, .01, .025, .05, .075, .1, .25, .5, .75, 1},
		},
		[]string{"store"},
	)
	MetricPrometheusStoreLastGCSeconds = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "prom_store_last_gc_seconds",
			Help: "Duration of last metric store GC job run",
		},
		[]string{"store"},
	)
	MetricPrometheusStoreEvictionCount = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "prom_store_eviction_count",
			Help: "Number of metrics evicted based on visibility timeout",
		},
		[]string{"store"},
	)
	MetricPrometheusStoreLastEvictionCount = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "prom_store_last_eviction_count",
			Help: "Number of metrics evicted based on visibility timeout on the last GC job run",
		},
		[]string{"store"},
	)
)

Functions

This section is empty.

Types

type Destination

type Destination interface {
	Publish(map[string]interface{})
}

type DiscardDestination

type DiscardDestination struct {
	Config *DiscardDestinationConfig
}

func NewDiscardDestination

func NewDiscardDestination(config *DiscardDestinationConfig) DiscardDestination

func (*DiscardDestination) Publish

func (d *DiscardDestination) Publish(msg map[string]interface{})

type DiscardDestinationConfig

type DiscardDestinationConfig struct {
}

type ElasticseachDestination

type ElasticseachDestination struct {
	Config *ElasticseachDestinationConfig
	// contains filtered or unexported fields
}

func (*ElasticseachDestination) Publish

func (d *ElasticseachDestination) Publish(msg map[string]interface{})

type ElasticseachDestinationConfig

type ElasticseachDestinationConfig struct {
	Index               string   `yaml:"index"`
	TimestampField      string   `yaml:"timestamp_field"`
	SynchronousIndexing bool     `yaml:"synchronous_indexing"`
	Addresses           []string `yaml:"addresses"`
	ElasticsearchConfig *elasticsearch.Config
	BulkIndexerConfig   *esutil.BulkIndexerConfig
}

type LokiDestination

type LokiDestination struct {
	Config *LokiDestinationConfig
	// contains filtered or unexported fields
}

func NewLokiDestination

func NewLokiDestination(config *LokiDestinationConfig) LokiDestination

func (*LokiDestination) Publish

func (d *LokiDestination) Publish(msg map[string]interface{})

type LokiDestinationConfig

type LokiDestinationConfig struct {
	PushURL        string            `yaml:"push_url"`
	StaticLabels   map[string]string `yaml:"static_labels"`
	DynamicLabels  []string          `yaml:"dynamic_labels"`
	BatchWait      time.Duration     `yaml:"batch_wait"`
	BatchSize      int               `yaml:"batch_size"`
	MakeLokiSuffer bool              `yaml:"make_loki_suffer"`
}

type PrometheusDestination

type PrometheusDestination struct {
	Config *PrometheusDestinationConfig
	// contains filtered or unexported fields
}

func (*PrometheusDestination) Collect

func (d *PrometheusDestination) Collect(ch chan<- prometheus.Metric)

func (*PrometheusDestination) Describe

func (d *PrometheusDestination) Describe(ch chan<- *prometheus.Desc)

func (*PrometheusDestination) Publish

func (d *PrometheusDestination) Publish(msg map[string]interface{})

type PrometheusDestinationConfig

type PrometheusDestinationConfig struct {
	Namespace           string        `yaml:"namespace"`
	MetricLabels        []string      `yaml:"metric_labels"`
	VisibilityTimeout   time.Duration `yaml:"visibility_timeout"`
	GCInterval          time.Duration `yaml:"gc_interval"`
	CountBytes          bool          `yaml:"count_bytes"`
	CountPackets        bool          `yaml:"count_packets"`
	CountFlows          bool          `yaml:"count_flows"`
	ObserveFlowDuration bool          `yaml:"observe_flow_duration"`
	FlowDurationBuckets []float64     `yaml:"flow_duration_buckets"`
	ExportIpInfo        bool          `yaml:"export_ip_info"`
	IpInfoLabels        []string      `yaml:"ip_info_labels"`
}

type StdoutDestination

type StdoutDestination struct {
	Config *StdoutDestinationConfig

	Writer io.Writer
	// contains filtered or unexported fields
}

func NewStdoutDestination

func NewStdoutDestination(config *StdoutDestinationConfig) StdoutDestination

func (*StdoutDestination) Publish

func (d *StdoutDestination) Publish(msg map[string]interface{})

type StdoutDestinationConfig

type StdoutDestinationConfig struct {
	Format string `yaml:"format"`
}

Jump to

Keyboard shortcuts

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