Documentation ¶
Index ¶
- func GetExporterName() string
- func GetRevision() string
- func GetVersion() string
- func GetVersionBuildContext() string
- func GetVersionInfo() string
- type Exporter
- type NetworkNode
- func (n *NetworkNode) Collect(ch chan<- prometheus.Metric)
- func (n *NetworkNode) Describe(ch chan<- *prometheus.Desc)
- func (n *NetworkNode) GatherMetrics()
- func (n *NetworkNode) GetInterfaces(cli *api.Client)
- func (n *NetworkNode) GetMetricsTable() string
- func (n *NetworkNode) GetRoutingBgp(cli *api.Client)
- func (n *NetworkNode) GetSystemEnvironment(cli *api.Client)
- func (n *NetworkNode) GetSystemResources(cli *api.Client)
- func (n *NetworkNode) GetTransceivers(cli *api.Client)
- func (n *NetworkNode) GetVlans(cli *api.Client)
- func (n *NetworkNode) IncrementErrorCounter()
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVersionBuildContext ¶
func GetVersionBuildContext() string
GetVersionBuildContext returns exporter build context.
Types ¶
type Exporter ¶
type Exporter struct { sync.RWMutex InventoryFile string VaultFile string VaultKeyFile string Inventory *ansible.Inventory Vault *ansible.Vault Modules map[string]bool Subsystems map[string]bool Nodes map[string]*NetworkNode Tokens map[string]bool // contains filtered or unexported fields }
Exporter holds the inventory and credentials for accessing network nodes. It also contains exporters for each of the nodes.
func NewExporter ¶
NewExporter returns an initialized Exporter.
func (*Exporter) AddAuthenticationToken ¶
AddAuthenticationToken adds an authentication token for accessing the exporter itself.
func (*Exporter) GetPollInterval ¶
GetPollInterval returns exporters minimal polling/scraping interval.
func (*Exporter) Scrape ¶
func (e *Exporter) Scrape(w http.ResponseWriter, r *http.Request)
Scrape scrapes individual nodes.
func (*Exporter) SetPollInterval ¶
SetPollInterval sets exporter's minimal polling/scraping interval.
type NetworkNode ¶
type NetworkNode struct { sync.RWMutex Name string UUID string Variables map[string]string Interfaces map[string]string Vlans map[string]string // contains filtered or unexported fields }
NetworkNode is an instance of a managed network node, e.g. a router or switch.
func (*NetworkNode) Collect ¶
func (n *NetworkNode) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (*NetworkNode) Describe ¶
func (n *NetworkNode) Describe(ch chan<- *prometheus.Desc)
Describe describes all the metrics ever exported by the exporter. It implements prometheus.Collector.
func (*NetworkNode) GatherMetrics ¶
func (n *NetworkNode) GatherMetrics()
GatherMetrics collect data from a network node and stores them as Prometheus metrics.
func (*NetworkNode) GetInterfaces ¶
func (n *NetworkNode) GetInterfaces(cli *api.Client)
GetInterfaces collects interface related metrics.
func (*NetworkNode) GetMetricsTable ¶
func (n *NetworkNode) GetMetricsTable() string
GetMetricsTable returns markdown-formatted table with the name, help, and labels of the metrics produced by the exporter.
func (*NetworkNode) GetRoutingBgp ¶
func (n *NetworkNode) GetRoutingBgp(cli *api.Client)
GetRoutingBgp collects BGP routing related metrics.
func (*NetworkNode) GetSystemEnvironment ¶
func (n *NetworkNode) GetSystemEnvironment(cli *api.Client)
GetSystemEnvironment collects system environment related metrics, e.g. fans, power supplies, sensors, etc.
func (*NetworkNode) GetSystemResources ¶
func (n *NetworkNode) GetSystemResources(cli *api.Client)
GetSystemResources collects system resource usage metrics. That includes data about CPU, memory, and processes.
func (*NetworkNode) GetTransceivers ¶
func (n *NetworkNode) GetTransceivers(cli *api.Client)
GetTransceivers collects interface fiber transceiver related metrics.
func (*NetworkNode) GetVlans ¶
func (n *NetworkNode) GetVlans(cli *api.Client)
GetVlans collects VLAN related metrics.
func (*NetworkNode) IncrementErrorCounter ¶
func (n *NetworkNode) IncrementErrorCounter()
IncrementErrorCounter increases the counter of failed queries to a network node.
Source Files ¶
- auth.go
- collect.go
- collect_bgp.go
- collect_interfaces.go
- collect_system_environment.go
- collect_system_resources.go
- collect_transceivers.go
- collect_vlans.go
- describe.go
- describe_interface.go
- describe_node.go
- describe_system.go
- describe_system_environment.go
- describe_system_resources.go
- describe_transceivers.go
- describe_vlan.go
- http_summary.go
- metric_table.go
- network_exporter.go
- network_node.go