add some debug log
This commit is contained in:
parent
372f8169c6
commit
26d4bf1195
|
@ -3,12 +3,12 @@
|
|||
|
||||
[[instances]]
|
||||
# send ping packets to
|
||||
targets = [
|
||||
"www.baidu.com",
|
||||
"127.0.0.1",
|
||||
"10.4.5.6",
|
||||
"10.4.5.7"
|
||||
]
|
||||
# targets = [
|
||||
# "www.baidu.com",
|
||||
# "127.0.0.1",
|
||||
# "10.4.5.6",
|
||||
# "10.4.5.7"
|
||||
# ]
|
||||
|
||||
# # append some labels for series
|
||||
# labels = { region="cloud", product="n9e" }
|
||||
|
|
|
@ -143,6 +143,12 @@ func (p *Ping) gatherOnce(slist *list.SafeList, ins *PingInstance) {
|
|||
}
|
||||
}
|
||||
|
||||
if config.Config.DebugMode {
|
||||
if len(ins.Targets) == 0 {
|
||||
log.Println("D! ping targets empty")
|
||||
}
|
||||
}
|
||||
|
||||
wg := new(sync.WaitGroup)
|
||||
for _, target := range ins.Targets {
|
||||
wg.Add(1)
|
||||
|
|
Loading…
Reference in New Issue