Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
func (*Database) GetAllRecords ¶
type PrometheusCollector ¶
type PrometheusCollector struct {
// contains filtered or unexported fields
}
func (*PrometheusCollector) Collect ¶
func (collector *PrometheusCollector) Collect(ch chan<- prometheus.Metric)
func (*PrometheusCollector) Describe ¶
func (collector *PrometheusCollector) Describe(ch chan<- *prometheus.Desc)
type PrometheusExporter ¶
type PrometheusExporter struct {
MetaReg *prometheus.Registry
FlowReg *prometheus.Registry
// contains filtered or unexported fields
}
Exporter provides export features to Prometheus
func (*PrometheusExporter) Initialize ¶
func (e *PrometheusExporter) Initialize(collector *PrometheusCollector)
Initialize Prometheus Exporter
func (*PrometheusExporter) ServeEndpoints ¶
func (e *PrometheusExporter) ServeEndpoints(segment *ToptalkersMetrics)
listen on given endpoint addr with Handler for metricPath and flowdataPath
type Record ¶
type ToptalkersMetrics ¶
type ToptalkersMetrics struct {
segments.BaseFilterSegment
TrafficType string // optional, default is "", name for the traffic type (included as label)
Buckets int // optional, default is 60, sets the number of seconds used as a sliding window size
ThresholdBuckets int // optional, use the last N buckets for calculation of averages, default: $Buckets
ReportBuckets int // optional, use the last N buckets to calculate averages that are reported as result, default: $Buckets
BucketDuration int // optional, duration of a bucket, default is 1 second
ThresholdBps uint64 // optional, default is 0, only log talkers with an average bits per second rate higher than this value
ThresholdPps uint64 // optional, default is 0, only log talkers with an average packets per second rate higher than this value
Endpoint string // optional, default value is ":8080"
MetricsPath string // optional, default is "/metrics"
FlowdataPath string // optional, default is "/flowdata"
RelevantAddress string // optional, default is "destination", options are "destination", "source", "both"
// contains filtered or unexported fields
}
func (ToptalkersMetrics) New ¶
func (segment ToptalkersMetrics) New(config map[string]string) segments.Segment
func (*ToptalkersMetrics) Run ¶
func (segment *ToptalkersMetrics) Run(wg *sync.WaitGroup)
Click to show internal directories.
Click to hide internal directories.