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 optics.Collector instance.


type Collector

type Collector struct {

Collector gathers transceiver metrics on Cisco devices running IOS.

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, transceiversChan chan *Transceiver, done chan struct{})

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

type Transceiver

type Transceiver struct {
	Name          string
	Temperature   map[string]float64
	Voltage       map[string]float64
	Current       map[string]float64
	TransmitPower map[string]float64
	ReceivePower  map[string]float64

Transceiver represent a transceiver inserted into a cisco device running IOS.

func NewTransceiver

func NewTransceiver() *Transceiver

NewTransceiver initializes some fields and returns a new optics.Transceiver instance.

Jump to

Keyboard shortcuts

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