Documentation
¶
Index ¶
- Constants
- type ErrorCounter
- type ErrorSeverity
- type EvictionCounter
- type FlowBufferSizeGauge
- type FlowEnrichmentCounter
- type InterfaceEventsCounter
- type Level
- type MetricDefinition
- type Metrics
- func (m *Metrics) CreateBatchCounter(exporter string) prometheus.Counter
- func (m *Metrics) CreateInterfaceBufferGauge(name string, f func() float64)
- func (m *Metrics) CreateSamplingRate() prometheus.Gauge
- func (m *Metrics) CreateTimeSpendInLookupAndDelete() prometheus.Histogram
- func (m *Metrics) NewCounter(def *MetricDefinition, labels ...string) prometheus.Counter
- func (m *Metrics) NewCounterVec(def *MetricDefinition) *prometheus.CounterVec
- func (m *Metrics) NewGauge(def *MetricDefinition, labels ...string) prometheus.Gauge
- func (m *Metrics) NewGaugeFunc(def *MetricDefinition, function func() float64, labelValues ...string)
- func (m *Metrics) NewGaugeVec(def *MetricDefinition) *prometheus.GaugeVec
- func (m *Metrics) NewHistogram(def *MetricDefinition, buckets []float64, labels ...string) prometheus.Histogram
- type PromConnectionInfo
- type PromTLS
- type Settings
Constants ¶
View Source
const ( TypeCounter metricType = "counter" TypeGauge metricType = "gauge" TypeHistogram metricType = "histogram" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorCounter ¶
type ErrorCounter struct {
// contains filtered or unexported fields
}
func (*ErrorCounter) WithErrorName ¶
func (c *ErrorCounter) WithErrorName(component, errName string, severity ErrorSeverity) prometheus.Counter
type ErrorSeverity ¶
type ErrorSeverity string
const ( HighSeverity ErrorSeverity = "high" MediumSeverity ErrorSeverity = "medium" LowSeverity ErrorSeverity = "low" )
type EvictionCounter ¶
type EvictionCounter struct {
// contains filtered or unexported fields
}
EvictionCounter provides syntactic sugar hidding prom's counter for eviction purpose
func (*EvictionCounter) WithSource ¶
func (c *EvictionCounter) WithSource(source string) prometheus.Counter
func (*EvictionCounter) WithSourceAndReason ¶
func (c *EvictionCounter) WithSourceAndReason(source, reason string) prometheus.Counter
type FlowBufferSizeGauge ¶
type FlowBufferSizeGauge struct {
// contains filtered or unexported fields
}
FlowBufferSizeGauge provides syntactic sugar hidding prom's gauge tailored for flows buffer size, backed by GaugeVec
func (*FlowBufferSizeGauge) WithBufferName ¶
func (g *FlowBufferSizeGauge) WithBufferName(bufferName string) prometheus.Gauge
type FlowEnrichmentCounter ¶
type FlowEnrichmentCounter struct {
// contains filtered or unexported fields
}
func (*FlowEnrichmentCounter) Increase ¶
func (c *FlowEnrichmentCounter) Increase(hasDNS, hasRTT, hasDrops, hasNetEvents, hasXlat, hasIPSec bool)
type InterfaceEventsCounter ¶
type MetricDefinition ¶
type Metrics ¶
type Metrics struct {
Settings *Settings
// Shared metrics:
EvictionCounter *EvictionCounter
EvictedFlowsCounter *EvictionCounter
EvictedPacketsCounter *EvictionCounter
DroppedFlowsCounter *EvictionCounter
FilteredFlowsCounter *EvictionCounter
NetworkEventsCounter *EvictionCounter
FlowBufferSizeGauge *FlowBufferSizeGauge
Errors *ErrorCounter
FlowEnrichmentCounter *FlowEnrichmentCounter
InterfaceEventsCounter *InterfaceEventsCounter
}
func NewMetrics ¶
func (*Metrics) CreateBatchCounter ¶
func (m *Metrics) CreateBatchCounter(exporter string) prometheus.Counter
func (*Metrics) CreateInterfaceBufferGauge ¶
func (*Metrics) CreateSamplingRate ¶
func (m *Metrics) CreateSamplingRate() prometheus.Gauge
func (*Metrics) CreateTimeSpendInLookupAndDelete ¶
func (m *Metrics) CreateTimeSpendInLookupAndDelete() prometheus.Histogram
func (*Metrics) NewCounter ¶
func (m *Metrics) NewCounter(def *MetricDefinition, labels ...string) prometheus.Counter
func (*Metrics) NewCounterVec ¶
func (m *Metrics) NewCounterVec(def *MetricDefinition) *prometheus.CounterVec
func (*Metrics) NewGauge ¶
func (m *Metrics) NewGauge(def *MetricDefinition, labels ...string) prometheus.Gauge
func (*Metrics) NewGaugeFunc ¶
func (m *Metrics) NewGaugeFunc(def *MetricDefinition, function func() float64, labelValues ...string)
func (*Metrics) NewGaugeVec ¶
func (m *Metrics) NewGaugeVec(def *MetricDefinition) *prometheus.GaugeVec
func (*Metrics) NewHistogram ¶
func (m *Metrics) NewHistogram(def *MetricDefinition, buckets []float64, labels ...string) prometheus.Histogram
type PromConnectionInfo ¶
type Settings ¶
type Settings struct {
PromConnectionInfo
Prefix string
Level Level
}
Click to show internal directories.
Click to hide internal directories.