Documentation ¶
Index ¶
- type FactProvider
- type GathererWithInfo
- type Manager
- type Target
- func (t *Target) Address() string
- func (t *Target) Facts(ctx context.Context, maxAge time.Duration) (facts map[string]string, err error)
- func (t *Target) Gather() ([]*dto.MetricFamily, error)
- func (t *Target) GatherWithState(ctx context.Context, state registry.GatherState) ([]*dto.MetricFamily, error)
- func (t *Target) Name(ctx context.Context) (string, error)
- func (t *Target) String(ctx context.Context) string
- type TargetOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FactProvider ¶
type GathererWithInfo ¶
type GathererWithInfo struct { Gatherer prometheus.Gatherer Address string ExtraLabels map[string]string }
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(exporterAddress string, scaperFact FactProvider, targets []config.SNMPTarget) (*Manager, prometheus.MultiError)
NewManager return a new SNMP manager.
func (*Manager) Gatherers ¶
func (m *Manager) Gatherers() []GathererWithInfo
Gatherers return gatheres for SNMP metrics of each targets.
func (*Manager) OnlineCount ¶
OnlineCount return the number of target that are available (e.g. for which Facts worked). To have accurate value, Facts should be used, else the value will be updated by OnlineCount in *background* (meaning value will be available on later call to OnlineCount).
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target represents a snmp config instance.
func (*Target) Gather ¶
func (t *Target) Gather() ([]*dto.MetricFamily, error)
Gather implement prometheus.Gatherer.
func (*Target) GatherWithState ¶
func (t *Target) GatherWithState(ctx context.Context, state registry.GatherState) ([]*dto.MetricFamily, error)
type TargetOptions ¶
Click to show internal directories.
Click to hide internal directories.