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: 3 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Config

type Config struct {
	Devices map[string]*DeviceConfig `yaml:"devices,omitempty"`

Config provides means of reading the configuration file

func Load

func Load(reader io.Reader) (*Config, error)

Load loads the configuration from the given reader.

type DeviceConfig

type DeviceConfig struct {
	OSVersion         OSVersion
	Host              string
	Port              int      `yaml:"port,omitempty"`
	Username          string   `yaml:"username"`
	KeyFile           string   `yaml:"key_file,omitempty"`
	Password          string   `yaml:"password,omitempty"`
	ConnectTimeout    int      `yaml:"connect_timeout,omitempty"`
	CommandTimeout    int      `yaml:"command_timeout,omitempty"`
	EnabledCollectors []string `yaml:"enabled_collectors,flow"`
	Interfaces        []string `yaml:"interfaces,flow"`

DeviceConfig is used to read device configuration from the config file DeviceConfig describe how to connect to a remote device and what metrics to extract from the remote device.

type OSVersion

type OSVersion int

OSVersion is a type to refere to the remote device's operating system. Different parsers / commands might be needed due to differences in the Cisco CLI.

const (
	// INVALID The remote device's OS could not be fingerprinted.
	INVALID OSVersion = 0
	// IOSXE The remote device is running IOS XE.
	IOSXE OSVersion = 1
	// IOS The remote device is running IOS.
	IOS OSVersion = 2
	// NXOS The remote device is running NX OS.
	NXOS OSVersion = 3

func GetAllOsVersions added in v1.0.3

func GetAllOsVersions() []OSVersion

GetAllOsVersions returns all known and valid os version

func (OSVersion) String added in v1.0.3

func (o OSVersion) String() string

OSVersionToString converts OSVersion to a string

Jump to

Keyboard shortcuts

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