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 ¶
func New ¶
func New(log log.Logger, c *Config) (integrations.Integration, error)
New creates a new snmp_exporter integration
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 ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.