Documentation
¶
Overview ¶
Package snmp_exporter embeds https://github.com/prometheus/snmp_exporter
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{
WalkParams: make(map[string]snmp_config.WalkParams),
SnmpConfigFile: "",
SnmpTargets: make([]SNMPTarget, 0),
}
DefaultConfig holds the default settings for the snmp_exporter integration.
Functions ¶
Types ¶
type Config ¶
type Config struct {
WalkParams map[string]snmp_config.WalkParams `yaml:"walk_params,omitempty"`
SnmpConfigFile string `yaml:"config_file,omitempty"`
SnmpTargets []SNMPTarget `yaml:"snmp_targets"`
}
Config configures the SNMP integration.
func (*Config) InstanceKey ¶
func (c *Config) InstanceKey(agentKey string) (string, error)
InstanceKey returns the hostname:port of the agent.
func (*Config) NewIntegration ¶
func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)
NewIntegration creates a new SNMP integration.
func (*Config) UnmarshalYAML ¶
func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler for Config.
type Integration ¶
type Integration struct {
// contains filtered or unexported fields
}
Integration is the SNMP integration. The integration scrapes metrics from the host Linux-based system.
func (*Integration) MetricsHandler ¶
func (i *Integration) MetricsHandler() (http.Handler, error)
MetricsHandler implements Integration.
func (*Integration) Run ¶
func (i *Integration) Run(ctx context.Context) error
Run satisfies Integration.Run.
func (*Integration) ScrapeConfigs ¶
func (i *Integration) ScrapeConfigs() []config.ScrapeConfig
ScrapeConfigs satisfies Integration.ScrapeConfigs.
type SNMPTarget ¶
type SNMPTarget struct {
Name string `yaml:"name"`
Target string `yaml:"address"`
Module string `yaml:"module"`
WalkParams string `yaml:"walk_params,omitempty"`
}
SNMPTarget defines a target device to be used by the integration.
Click to show internal directories.
Click to hide internal directories.