opticsnxos

package
v1.0.3 Latest Latest
Warning

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCollector

func NewCollector() collector.Collector

NewCollector returns a new opticsnxos.Collector instance.

Types

type Collector

type Collector struct {
}

Collector gathers transceiver metrics on Cisco devices running NX OS.

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

func (*Collector) Parse

func (c *Collector) Parse(sshCtx *connector.SSHCommandContext, transceivers chan *NXOSTransceiver, done chan struct{})

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

type NXOSTransceiver

type NXOSTransceiver struct {
	Lane          string
	Name          string
	Temperature   map[string]float64
	Voltage       map[string]float64
	Current       map[string]float64
	TransmitPower map[string]float64
	ReceivePower  map[string]float64
	Faultcount    float64
}

NXOSTransceiver represents a transceiver inserted into a cisco device running NX OS.

func NewTransceiver

func NewTransceiver() *NXOSTransceiver

NewTransceiver initializes some fields and returns a new opticsnxos.NXOSTransceiver intance.

Jump to

Keyboard shortcuts

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