Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't report 0ms on timeout in dns_query #4118

Merged
merged 1 commit into from
May 8, 2018
Merged

Conversation

danielnelson
Copy link
Contributor

Adds result tag and result_code field for results: success, timeout, error. If the result is not success, the query_time_ms field will be omitted.

closes #2548

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

@danielnelson danielnelson added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label May 8, 2018
@danielnelson danielnelson added this to the 1.7.0 milestone May 8, 2018
@danielnelson danielnelson merged commit c16ecaa into master May 8, 2018
@danielnelson danielnelson deleted the dns-query-timeout branch May 8, 2018 01:18
@discoduck2x
Copy link

@danielnelson exited to test this - is there a way to get hold of nightly builds for telegraf?

jvrahav pushed a commit to jvrahav/telegraf that referenced this pull request May 9, 2018
@danielnelson
Copy link
Contributor Author

Yes, these packages are updated by the CircleCI build:

https://github.com/influxdata/telegraf#nightly-builds

arkady-emelyanov pushed a commit to arkady-emelyanov/telegraf that referenced this pull request May 18, 2018
maxunt pushed a commit that referenced this pull request Jun 26, 2018
@randallt
Copy link

randallt commented Oct 3, 2018

Why wouldn't you report the timeout value for query_time_ms? I'm trying to use this right now to help debug an issue and if a request times out, I would expect to see a high response time recorded.

@danielnelson
Copy link
Contributor Author

It has been some time, but I believe it stems back to the changes on http_response where we had an existing field response_time and we didn't want to set it to the timeout as there was no response. The changes made here were based on the earlier change although you could argue that with query_time_ms the field name is valid even if the query times out.

One potential issue with mixing success and timeout together is that when you aggregate the timeout values can skew the results. This is probably not a big problem because you could use a tag to exclude the timeout times.

@randallt
Copy link

randallt commented Oct 3, 2018

The timeouts are exactly the thing I'm looking for. At first I didn't even notice them until I saw the log entries. Seems a backward way of doing it.

@danielnelson
Copy link
Contributor Author

If the query_time_ms is used, one might still miss them as it could appear that they are successfully completing after timeout seconds. I think gaps in the data are probably more noticeable but it depends on how you are viewing the data, and for alerts you really need to watch the result tag.

otherpirate pushed a commit to otherpirate/telegraf that referenced this pull request Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dns_query should not report 0ms query time on error
3 participants