Documentation ¶
Overview ¶
Collects and serves statistics about flows. Configuration options for this segments are: The endoint field can be configured: <host>:8080/flowdata <host>:8080/metrics The labels to be exported can be set in the configuration. Default labels are:
router,ipversion,application,protoname,direction,peer,remoteas,remotecountry
Additional Labels are:
src_port,dst_port,src_ip,dst_ip
The additional label should be used with care, because of infite quantity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exporter ¶
type Exporter struct { MetaReg *prometheus.Registry FlowReg *prometheus.Registry // contains filtered or unexported fields }
Exporter provides export features to Prometheus
func (*Exporter) Increment ¶
func (e *Exporter) Increment(bytes uint64, packets uint64, labelset prometheus.Labels)
func (*Exporter) IncrementCtrl ¶
func (*Exporter) Initialize ¶
Initialize Prometheus Exporter
func (*Exporter) ServeEndpoints ¶
func (e *Exporter) ServeEndpoints(segment *Prometheus)
listen on given endpoint addr with Handler for metricPath and flowdataPath
type Prometheus ¶
type Prometheus struct { segments.BaseSegment Endpoint string // optional, default value is ":8080" MetricsPath string // optional, default is "/metrics" FlowdataPath string // optional, default is "/flowdata" Labels []string // optional, list of labels to be exported }
func (*Prometheus) Run ¶
func (segment *Prometheus) Run(wg *sync.WaitGroup)
Click to show internal directories.
Click to hide internal directories.