Documentation ¶
Index ¶
Constants ¶
const (
VERSION = "5.0.0"
)
changelog: 3.1.3: code refactor 3.1.4: bugfix ignore configuration 3.1.5: more sw support, DisplayByBit cfg 3.1.6 3.2.0: more sw support, fix ping bug, add ifOperStatus,ifBroadcastPkt,ifMulticastPkt 3.2.1 add Discards,Error,UnknownProtos,QLen,fix some bugs 3.2.1.1 debugmetric support multi endpoints and metrics 3.2.1.2 gosnmp use getnext to walk snmp 4.0.0 caculate counter type on swcollect local,add speedpercent 4.0.1 fix sometimes ifstat pannic 4.0.2 fix speedpercent bug 4.0.4 add lock on map;add limconn for switch snmp request 4.0.5 add custom metric,custom host 4.0.6.1 fix channal closed bug 4.0.6.2 fix Vendor bug;add remote config api 4.0.6.3 fix bugs -------------- 5.0.0 first ported version, complete rewrite
Variables ¶
This section is empty.
Functions ¶
func FillDefault ¶
func FillDefault(v interface{})
func ParseConfig ¶
func ParseConfig(cfg []byte)
Types ¶
type CustomMetric ¶
type GlobalConfig ¶
type GlobalConfig struct { Interval int64 `json:"interval" default:30` LogFile string `json:"logFile"` IpRange []string `json:"ipRange"` Gosnmp bool `json:"gosnmp" default:"true"` PingTimeout int `json:"pingTimeout" default:"300"` PingRetry int `json:"pingRetry" default:"4"` SnmpCommunity string `json:"snmpCommunity" default:"\"public\""` SnmpTimeout int `json:"snmpTimeout" default:"1000"` SnmpRetry int `json:"snmpRetry" default:"5"` IgnoreIface []string `json:"ignoreIface" default:"[\"Nu\", \"NU\", \"Vlan\", \"Vl\"]"` Ignore []string `json:"ignore"` FastPingMode bool `json:"fastPingMode"` ConcurrentQueriesPerHost int `json:"concurrentQueriesPerHost" default:"4"` ConcurrentCollectors int `json:"concurrentCollectors" default:"1000"` CustomMetrics []CustomMetric `json:"customMetrics"` ReverseLookup bool `json:"reverseLookup" default:"false"` CustomHosts map[string]string `json:"customHosts"` }
func Config ¶
func Config() *GlobalConfig