Fix interface option with method = native in ping input (#6667)

This commit is contained in:
Daniel Nelson 2019-11-18 10:27:31 -08:00 committed by GitHub
parent e8d6d445f4
commit 9f05163c53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ func (*Ping) SampleConfig() string {
}
func (p *Ping) Gather(acc telegraf.Accumulator) error {
if p.Interface != "" && p.listenAddr != "" {
if p.Interface != "" && p.listenAddr == "" {
p.listenAddr = getAddr(p.Interface)
}