diff --git a/funcs/swifstat.go b/funcs/swifstat.go index efc4335..fa71169 100644 --- a/funcs/swifstat.go +++ b/funcs/swifstat.go @@ -331,8 +331,8 @@ func swIfMetrics() (L []*model.MetricValue) { } } } + lastIfStat[chIfStat.Ip] = chIfStat.IfStatsList } - lastIfStat[chIfStat.Ip] = chIfStat.IfStatsList } endTime := time.Now() diff --git a/g/const.go b/g/const.go index 31f8b15..e976694 100644 --- a/g/const.go +++ b/g/const.go @@ -14,8 +14,9 @@ import ( // 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 const ( - VERSION = "4.0.0" + VERSION = "4.0.1" COLLECT_INTERVAL = time.Second )