promexp

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package promexp receives enriched flow data from Producer, stores it in a temporary buffer and waits for a Prometheus scrape event for further processing. At that time promexp executes these tasks:

  • Checks out the accumulated flows from the temporary buffer.
  • Aggregates those flows over a user defined label set.
  • Checks if aggregates are compliant with a minimum user defined data rate. If not, they are added to the untracked counters and removed from table.
  • Checks the remaining flows in table for age. The expired ones are evicted.
  • Exports the remaining flows to the Prometheus client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MetricsName  string
	MinBps       uint64
	MinPps       uint64
	FlowLife     string
	MaxScrapeInt string
	LabelSet     []string
}

type GobiProm

type GobiProm struct {
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *GobiProm

func (*GobiProm) Collect

func (g *GobiProm) Collect(ch chan<- prometheus.Metric)

Collect implements the Prometheus Collect interface. This method is called by Prometheus Client each time the exporter is scraped.

func (*GobiProm) Consume

func (g *GobiProm) Consume(flow producer.Flow)

func (*GobiProm) Describe

func (g *GobiProm) Describe(ch chan<- *prometheus.Desc)

Jump to

Keyboard shortcuts

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