v1.0.3 Latest Latest

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

Go to latest
Published: Jul 30, 2020 License: GPL-3.0 Imports: 6 Imported by: 0




This section is empty.


This section is empty.


func NewCollector

func NewCollector() collector.Collector

NewCollector returns a new instace of interface.Collector.

func Parse

func Parse(sshCtx *connector.SSHCommandContext, interfaces chan *Interface, done chan struct{})

Parse parses cli output and tries to find interfaces with related stats


type Collector

type Collector struct {

Collector gathers counters for remote device's interfaces.

func (*Collector) Collect

func (c *Collector) Collect(ctx *collector.CollectContext)

Collect implements the collector.Collector interface's Collect function

func (*Collector) Describe

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

Describe implements the collector.Collector interface's Describe function

func (*Collector) Name

func (*Collector) Name() string

Name implements the collector.Collector interface's Name function

type Interface

type Interface struct {
	Name        string
	MacAddress  string
	Description string

	AdminStatus string
	OperStatus  string

	InputErrors  float64
	OutputErrors float64

	InputDrops  float64
	OutputDrops float64

	InputBytes  float64
	OutputBytes float64

	Speed string

Interface represents a network interface on the remote device

Jump to

Keyboard shortcuts

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