Skip to content

Commit

Permalink
fix git update wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
freedomkk-qfeng committed Aug 17, 2016
1 parent 5eb24de commit 3b10f94
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 30 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,8 @@ swcollector需要部署到有交换机SNMP访问权限的服务器上。
{
"debug": true,
"debugmetric":{ # 在日志中 debug 具体的指标
<<<<<<< HEAD
"endpoints":["192.168.56.101","192.168.56.102"], # 必填
"metrics":["switch.if.In","switch.if.Out"], # 必填
=======
"endpoint":"192.168.56.101", # 必填
"metric":"switch.if.In", # 必填
>>>>>>> origin/master
"tags":"ifName=Fa0/1" # 有则匹配 tag,如为 "" 则打印该 metric 的全部信息
},
"switch":{
Expand Down
5 changes: 0 additions & 5 deletions cfg.example.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"debug": true,
"debugmetric":{
<<<<<<< HEAD
"endpoints":["192.168.56.101","192.168.56.102"],
"metrics":["switch.if.In","switch.if.Out"],
=======
"endpoint":"192.168.56.101",
"metric":"switch.if.In",
>>>>>>> origin/master
"tags":"ifName=Fa0/1"
},
"switch":{
Expand Down
6 changes: 0 additions & 6 deletions g/cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ import (
)

type DebugmetricConfig struct {
<<<<<<< HEAD
Endpoints []string `json:"endpoints`
Metrics []string `json:"metrics`
Tags string `json:"tags"`
=======
Endpoint string `json:"endpoint`
Metric string `json:"metric`
Tags string `json:"tags"`
>>>>>>> origin/master
}

type SwitchConfig struct {
Expand Down
5 changes: 0 additions & 5 deletions g/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@ import (
// 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
<<<<<<< HEAD
// 3.2.1.1 debugmetric support multi endpoints and metrics
const (
VERSION = "3.2.1.1"
=======
const (
VERSION = "3.2.1"
>>>>>>> origin/master
COLLECT_INTERVAL = time.Second
)
9 changes: 0 additions & 9 deletions g/var.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,14 @@ func SendToTransfer(metrics []*model.MetricValue) {
}

debug := Config().Debug
<<<<<<< HEAD
debug_endpoints := Config().Debugmetric.Endpoints
debug_metrics := Config().Debugmetric.Metrics
=======
debug_endpoint := Config().Debugmetric.Endpoint
debug_metric := Config().Debugmetric.Metric
>>>>>>> origin/master
debug_tags := Config().Debugmetric.Tags
debug_Tags := strings.Split(debug_tags, ",")
if debug {
for _, metric := range metrics {
metric_tags := strings.Split(metric.Tags, ",")
<<<<<<< HEAD
if in_array(metric.Endpoint, debug_endpoints) && in_array(metric.Metric, debug_metrics) {
=======
if metric.Endpoint == debug_endpoint && metric.Metric == debug_metric {
>>>>>>> origin/master
if array_include(debug_Tags, metric_tags) {
log.Printf("=> <Total=%d> %v\n", len(metrics), metric)
}
Expand Down

0 comments on commit 3b10f94

Please sign in to comment.