collector

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// RunCommandAndParse runs a command on JunOS and unmarshals the XML result
	RunCommandAndParse(cmd string, obj interface{}) error

	// RunCommandAndParseWithParser runs a command on JunOS and unmarshals the XML result using the specified parser function
	RunCommandAndParseWithParser(cmd string, parser rpc.Parser) error

	// IsSatelliteEnabled returns if sattelite features are enabled on the device
	IsSatelliteEnabled() bool

	IsScrapingLicenseEnabled() bool

	// Device returns device information for the connected device
	Device() *connector.Device

	// Ctx returns the context the client is running in
	Context() context.Context
}

type RPCCollector

type RPCCollector interface {
	// Name returns an human readable name for logging and debugging purposes
	Name() string

	// Describe describes the metrics
	Describe(ch chan<- *prometheus.Desc)

	// Collect collects metrics from JunOS
	Collect(client Client, ch chan<- prometheus.Metric, labelValues []string) error
}

RPCCollector collects metrics from JunOS using rpc.Client

Jump to

Keyboard shortcuts

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