Documentation ¶
Index ¶
- Constants
- Variables
- func If[T any](b bool, s1, s2 T) T
- func IsSymbolName(oid string) bool
- func JoinLines(s string) string
- func LoadMibs(verbose bool) *smi.MIB
- func Or(a, b string) string
- func ParseOIDSymbolName(dotOid string, mib *smi.MIB) (symbolName, description string, sym *smi.Symbol)
- func SymbolString(symbol *smi.Symbol, suffix smi.OID) (symbolName, description string)
- type ClientConfig
Constants ¶
View Source
const ( DefaultSnmpPort = 161 DefaultCommunity = "public" )
Variables ¶
View Source
var OidPattern = regexp.MustCompile(`\.?\d+(\.\d+)*`)
Functions ¶
func IsSymbolName ¶
func ParseOIDSymbolName ¶
Types ¶
type ClientConfig ¶
type ClientConfig struct { Timeout time.Duration `toml:"timeout" usage:"Timeout to wait for a response."` Retries int `toml:"retries" flag:",r" usage:"Number of retries to attempt."` Version int `toml:"version" flag:",v" usage:"SNMP version; can be 1, 2, or 3."` UnconnectedUDPSocket bool `` /* 215-byte string literal not displayed */ Community string `toml:"community" usage:"SNMP community string, Parameters for Version 1 & 2"` MaxRepetitions int `toml:"max_repetitions" usage:"The GETBULK max-repetitions parameter, Parameters for Version 2 & 3"` ContextName string `toml:"context_name" flag:",n" usage:"Context Name. for SNMPv3"` SecLevel string `toml:"sec_level" usage:"Security Level; one of none, authNoPriv, or authPriv. for SNMPv3"` UserName string `toml:"user_name" flag:",u" usage:"User Name. for SNMPv3"` AuthProtocol string `toml:"auth_protocol" flag:",a" usage:"Authentication protocol; one of MD5, SHA, SHA224, SHA256, SHA384, SHA512. for SNMPv3"` AuthPassword string `toml:"auth_password" flag:",A" usage:"Authentication password"` // Protocols "AES192", "AES192", "AES256", and "AES256C" require the underlying net-snmp tools // to be compiled with --enable-blumenthal-aes (http://www.net-snmp.org/docs/INSTALL.html) PrivProtocol string `toml:"priv_protocol" usage:"Privacy protocol used for encrypted messages; one of DES, AES, AES192, AES192C, AES256, AES256C"` PrivPassword string `toml:"priv_password" flag:",X" usage:"Privacy password used for encrypted messages"` EngineID string `toml:"engine_id"` EngineBoots int `toml:"engine_boots"` EngineTime int `toml:"engine_time"` }
func (*ClientConfig) CreateGoSNMP ¶
func (o *ClientConfig) CreateGoSNMP(target string, verbose bool) *g.GoSNMP
func (*ClientConfig) SetVersion3Parameters ¶
func (o *ClientConfig) SetVersion3Parameters(gs *g.GoSNMP)
Click to show internal directories.
Click to hide internal directories.