collector

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NodeTCPConnectionsDesc = prometheus.NewDesc(
		"node_tcp_connections",
		"Current amount of tcp connections on a node",
		nil, nil,
	)

	NodeActiveTCPRetransmits = prometheus.NewDesc(
		"node_tcp_retransmits",
		"Current amount of tcp retransmits on a node",
		nil, nil,
	)

	TCPConnectionsDesc = prometheus.NewDesc(
		"active_tcp_connections",
		"Number of active TCP connections by hosted pod name/namespace",
		[]string{"pod_name", "namespace_name"}, nil,
	)

	ActiveTCPRetransmits = prometheus.NewDesc(
		"active_tcp_retransmits",
		"Number of retransmits on active TCP connections by hosted pod name/namespace",
		[]string{"pod_name", "namespace_name"}, nil,
	)
)

Note, a sum over the pod tcp connections/ retransmits != the same value as the node aggregates. This is because the node aggregates don't just sum over pod namespaces but all namespaces including the default one.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	// Update gets new metrics and expose them via prometheus registry.
	Update(ch chan<- prometheus.Metric) error
}

Collector is the interface a collector has to implement.

func NewConntrackCollector

func NewConntrackCollector() (Collector, error)

NewConntrackCollector returns a new Collector exposing conntrack stats.

func NewKernelStatCollector added in v0.2.13

func NewKernelStatCollector() (Collector, error)

func NewNetlinkCollector added in v0.2.13

func NewNetlinkCollector() (Collector, error)

func NewPodIPMetricsCollector added in v0.6.11

func NewPodIPMetricsCollector() (Collector, error)

NewPodIpMetricsCollector returns a new Collector exposing pod IP allocation stats.

func NewSockStatCollector

func NewSockStatCollector() (Collector, error)

NewSockStatCollector returns a new Collector exposing socket stats.

type NodeCollector

type NodeCollector struct {
	Collectors map[string]Collector
	// contains filtered or unexported fields
}

NodeCollector implements the prometheus.Collector interface.

func NewNodeCollector

func NewNodeCollector(enabledCollectors []string, proc string, stack string) (*NodeCollector, []prometheus.Collector, error)

NewNodeCollector creates a new NodeCollector with given enabledCollectors (a list of enabled collectors name) and a list of prometheus collector

func (*NodeCollector) Collect

func (n *NodeCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (*NodeCollector) Describe

func (n *NodeCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

Jump to

Keyboard shortcuts

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