Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BGPCollector ¶
type BGPCollector struct{}
BGPCollector collects BGP metrics, implemented as per the Collector bgp.
func NewBGPCollector ¶
func NewBGPCollector() *BGPCollector
NewBGPCollector returns a BGPCollector type.
func (*BGPCollector) Collect ¶
func (c *BGPCollector) Collect(ch chan<- prometheus.Metric)
Collect metric from a passed netconf.Session.
func (*BGPCollector) CollectErrors ¶
func (*BGPCollector) CollectErrors() []error
CollectErrors returns what errors have been gathered.
func (*BGPCollector) CollectTotalErrors ¶
func (*BGPCollector) CollectTotalErrors() float64
CollectTotalErrors collects total errors.
func (*BGPCollector) Describe ¶
func (*BGPCollector) Describe(ch chan<- *prometheus.Desc)
Describe all metrics
func (*BGPCollector) Name ¶
func (*BGPCollector) Name() string
Name of the collector. Used to parse the configuration file.
type CollectErrors ¶
type CollectErrors interface { // Returns any errors that were encounted during Collect. CollectErrors() []error // Returns the total number of errors encounter during app run duration. CollectTotalErrors() float64 }
CollectErrors is used to collect collector errors.
type Collector ¶
type Collector struct { Name string PromCollector prometheus.Collector Errors CollectErrors }
Collector contains everything needed to collect from a collector.
type EnvCollector ¶
type EnvCollector struct{}
EnvCollector collects environment metrics, implemented as per the Collector env.
func NewEnvCollector ¶
func NewEnvCollector() *EnvCollector
NewEnvCollector returns a EnvCollector type.
func (*EnvCollector) Collect ¶
func (c *EnvCollector) Collect(ch chan<- prometheus.Metric)
Collect metrics as per the prometheus.Collector interface.
func (*EnvCollector) CollectErrors ¶
func (*EnvCollector) CollectErrors() []error
CollectErrors returns what errors have been gathered.
func (*EnvCollector) CollectTotalErrors ¶
func (*EnvCollector) CollectTotalErrors() float64
CollectTotalErrors collects total errors.
func (*EnvCollector) Describe ¶
func (*EnvCollector) Describe(ch chan<- *prometheus.Desc)
Describe all metrics implemented as per the prometheus.Collector interface.
func (*EnvCollector) Name ¶
func (*EnvCollector) Name() string
Name of the collector. Used to parse the configuration file.
type Exporters ¶
type Exporters struct {
Collectors []*Collector
}
Exporters contains a slice of Collectors.
func NewExporter ¶
NewExporter returns an Exporters type containing a slice of Collectors.
func (*Exporters) Collect ¶
func (e *Exporters) Collect(ch chan<- prometheus.Metric)
Collect implemented as per the prometheus.Collector interface.
func (*Exporters) Describe ¶
func (e *Exporters) Describe(ch chan<- *prometheus.Desc)
Describe implemented as per the prometheus.Collector interface.
func (*Exporters) SetConnectionDetails ¶
SetConnectionDetails sets the sshClientConfig and sshTarget variables required to make a connection.
func (*Exporters) SetIfaceDescrKeys ¶ added in v0.1.2
SetIfaceDescrKeys sets the optional keys in an interface description to include in metrics
type InterfaceCollector ¶
type InterfaceCollector struct{}
InterfaceCollector collects Iface metrics, implemented as per the Collector iface.
func NewInterfaceCollector ¶
func NewInterfaceCollector() *InterfaceCollector
NewInterfaceCollector returns a InterfaceCollector type.
func (*InterfaceCollector) Collect ¶
func (c *InterfaceCollector) Collect(ch chan<- prometheus.Metric)
Collect metric from a passed netconf.Session.
func (*InterfaceCollector) CollectErrors ¶
func (*InterfaceCollector) CollectErrors() []error
CollectErrors returns what errors have been gathered.
func (*InterfaceCollector) CollectTotalErrors ¶
func (*InterfaceCollector) CollectTotalErrors() float64
CollectTotalErrors collects total errors.
func (*InterfaceCollector) Describe ¶
func (*InterfaceCollector) Describe(ch chan<- *prometheus.Desc)
Describe all metrics
func (*InterfaceCollector) Name ¶
func (*InterfaceCollector) Name() string
Name of the collector. Used to parse the configuration file.
type PowerCollector ¶
type PowerCollector struct{}
PowerCollector collects power metrics, implemented as per the Collector power.
func NewPowerCollector ¶
func NewPowerCollector() *PowerCollector
NewPowerCollector returns a PowerCollector type.
func (*PowerCollector) Collect ¶
func (c *PowerCollector) Collect(ch chan<- prometheus.Metric)
Collect metrics as per the prometheus.Collector interface.
func (*PowerCollector) CollectErrors ¶
func (*PowerCollector) CollectErrors() []error
CollectErrors returns what errors have been gathered.
func (*PowerCollector) CollectTotalErrors ¶
func (*PowerCollector) CollectTotalErrors() float64
CollectTotalErrors collects total errors.
func (*PowerCollector) Describe ¶
func (*PowerCollector) Describe(ch chan<- *prometheus.Desc)
Describe all metrics implemented as per the prometheus.Collector interface.
func (*PowerCollector) Name ¶
func (*PowerCollector) Name() string
Name of the collector. Used to parse the configuration file.
type RECollector ¶
type RECollector struct{}
RECollector collects route enginer metrics.
func (*RECollector) Collect ¶
func (c *RECollector) Collect(ch chan<- prometheus.Metric)
Collect metrics as per the prometheus.Collector interface.
func (*RECollector) CollectErrors ¶
func (*RECollector) CollectErrors() []error
CollectErrors returns what errors have been gathered.
func (*RECollector) CollectTotalErrors ¶
func (*RECollector) CollectTotalErrors() float64
CollectTotalErrors collects total errors.
func (*RECollector) Describe ¶
func (*RECollector) Describe(ch chan<- *prometheus.Desc)
Describe all metrics implemented as per the prometheus.Collector interface.
func (*RECollector) Name ¶
func (*RECollector) Name() string
Name of the collector. Used to parse the configuration file.