netdev

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Up             = 0
	Testing        = 1
	Lowerlayerdown = 2
	Down           = 3
	Unknown        = 4
)

types and constants dormant = 5

View Source
const (
	IfaceDataName = iota
)

Variables

This section is empty.

Functions

func GetIfaceStatNames

func GetIfaceStatNames() []string

func TranslateIfaceState

func TranslateIfaceState(state uint) string

Types

type CheckConfig

type CheckConfig struct {
	WarningTotalCountOfInterfaces  thresholds.ThresholdWrapper
	CriticalTotalCountOfInterfaces thresholds.ThresholdWrapper

	DownIsCritical bool
	NotUpIsOK      bool

	Filters Filter
}

type Filter

type Filter struct {
	IncludeInterfaceNames []string
	ExcludeInterfaceNames []string

	IncludeIPRange []net.IP
	ExcludeIPRange []net.IP
}

type IfaceData

type IfaceData struct {
	Name      string
	Operstate uint
	Metrics   statistics
}

func FilterInterfaces

func FilterInterfaces(interfaces *[]IfaceData, filters *Filter) ([]IfaceData, error)

func GetAllInterfaces

func GetAllInterfaces() ([]IfaceData, error)

func (IfaceData) GetFilterableValue

func (iface IfaceData) GetFilterableValue(ident uint) string

Jump to

Keyboard shortcuts

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