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

[Heartbeat] Fix status for TCP checks #10777

Merged
merged 2 commits into from
Mar 6, 2019
Merged

Conversation

andrewvc
Copy link
Contributor

The heartbeat checks for TCP send/receive have been broken for a long time, since at least 6.3 from my testing. An error was returned, but the status was still set to 'up'.

This patch fixes that and adds tests.

@andrewvc andrewvc added bug backport Heartbeat Team:obs-ds-hosted-services Label for the Observability Hosted Services team labels Feb 15, 2019
@andrewvc andrewvc self-assigned this Feb 15, 2019
@andrewvc andrewvc requested a review from urso February 15, 2019 18:37
@elasticmachine
Copy link
Collaborator

Pinging @elastic/uptime

@andrewvc
Copy link
Contributor Author

@urso I'm requesting your review since Nicholas will be out, as will I next week. If this looks good please feel free to hit the merge button.

@andrewvc
Copy link
Contributor Author

As a note, we'll need to forward port this to 7.0

Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code LGTM but this will need a changelog entry.

Copy link

@urso urso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a bug fix changelog.
LGTM.

The heartbeat checks for TCP send/receive have been broken for a long time, since at least 6.3 from my testing. An error was returned, but the status was still set to 'up'.

This patch fixes that and adds tests.
@andrewvc andrewvc merged commit 4454842 into elastic:6.7 Mar 6, 2019
andrewvc added a commit to andrewvc/beats that referenced this pull request Mar 11, 2019
TCP checks are not adding URL fields on NXDOMAIN endpoints. This fixes that issue.

It does so by ensuring that URL metadata is added before executing the check, and not during, as done previously.

A side effect of this is that we now perform DNS lookups once per `{hostname,port}` instead of once per `{hostname}`. This is worth the increased simplicity however, as the code would be quite convoluted otherwise, which would put us at risk for more bugs.

Related (but different) 6.x issue: elastic#10777

Fix import formatting
andrewvc added a commit that referenced this pull request Mar 11, 2019
TCP checks are not adding URL fields on NXDOMAIN endpoints. This fixes that issue.

It does so by ensuring that URL metadata is added before executing the check, and not during, as done previously.

A side effect of this is that we now perform DNS lookups once per `{hostname,port}` instead of once per `{hostname}`. This is worth the increased simplicity however, as the code would be quite convoluted otherwise, which would put us at risk for more bugs.

Related (but different) 6.x issue: #10777

Fix import formatting
andrewvc added a commit to andrewvc/beats that referenced this pull request Mar 11, 2019
TCP checks are not adding URL fields on NXDOMAIN endpoints. This fixes that issue.

It does so by ensuring that URL metadata is added before executing the check, and not during, as done previously.

A side effect of this is that we now perform DNS lookups once per `{hostname,port}` instead of once per `{hostname}`. This is worth the increased simplicity however, as the code would be quite convoluted otherwise, which would put us at risk for more bugs.

Related (but different) 6.x issue: elastic#10777

Fix import formatting

(cherry picked from commit 821baec)
andrewvc added a commit that referenced this pull request Mar 12, 2019
TCP checks are not adding URL fields on NXDOMAIN endpoints. This fixes that issue.

It does so by ensuring that URL metadata is added before executing the check, and not during, as done previously.

A side effect of this is that we now perform DNS lookups once per `{hostname,port}` instead of once per `{hostname}`. This is worth the increased simplicity however, as the code would be quite convoluted otherwise, which would put us at risk for more bugs.

Related (but different) 6.x issue: #10777

Fix import formatting

(cherry picked from commit 821baec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug Heartbeat review Team:obs-ds-hosted-services Label for the Observability Hosted Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants