influxdata / influxdata/telegraf

[inputs.ping] Native method gives higher results comparing to exec

Open
#9,729 20 comments 2 reactions 0 assignees View on GitHub
area/ping bug upstream
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

Description

Native method gives wrong results comparing to exec mode.

### Relevant telegraf.conf:

```toml
[[inputs.ping]]
urls = [
"host1",
"host2",
"host3",
"host4",
"host5",
]
```

### System info:

Telegraf 1.19.3 (git: HEAD a799489f)
Debian Linux x86_64

### Steps to reproduce:

1. Collect ping data using preferred **native** method
2. Collect ping data using the **exec** method
3. Compare the results

### Expected behavior:

The ping reply time should be at least comparable

### Actual behavior:

Now it look like this
![image](https://user-images.githubusercontent.com/583157/132302253-d98fa765-8112-4241-8035-1454b116b229.png)

You probably can see on this graph at which time I changed from native to exec :)

### Additional info:

No idea why the ping is collecting the data wrongly in native mode - just guessing:
1. spawning new ping thread overhead?
2. thread's priority?

Contributor guide

Open the contributing guide

Research direction

Start with the inputs.ping native and exec collection paths and reproduce the comparison using the Telegraf configuration shown. Measure where reply times diverge, then verify that native-mode results are comparable to exec-mode results under the same hosts and collection conditions.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking, observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.