internal

package
v0.0.0-...-f1f7327 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNodeNotFound = "Node Node Found"
)

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Models map[string]SNMPModel
	Nodes  map[string]Node
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent() *Agent

func (*Agent) GetNode

func (a *Agent) GetNode(name string) (*Node, error)

func (*Agent) Poll

func (a *Agent) Poll(node *Node) error

func (*Agent) Start

func (a *Agent) Start()

func (*Agent) Walk

func (a *Agent) Walk(node *Node) error

type Node

type Node struct {
	Community   string `json:"community"`
	Host        string `json:"host"`
	Active      bool
	Port        uint16 `json:"port"`
	SNMPVersion int
	Model       string `json:"model"`
	Name        string `json:"name"`
	// contains filtered or unexported fields
}

func NodeFromDefaults

func NodeFromDefaults(node *Node) *Node

func (*Node) GetModel

func (n *Node) GetModel(models map[string]SNMPModel) (*SNMPModel, error)

type SNMPModel

type SNMPModel struct {
	NodeModel string    `hcl:"nodeModel"`
	Collect   []collect `hcl:"collect,block"`
}

func LoadNodeModel

func LoadNodeModel(path string) (SNMPModel, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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