Skip to content

[Heartbeat] Fix status for TCP checks#10777

Merged
andrewvc merged 2 commits intoelastic:6.7from
andrewvc:fix-tcp-updown
Mar 6, 2019
Merged

[Heartbeat] Fix status for TCP checks#10777
andrewvc merged 2 commits intoelastic:6.7from
andrewvc:fix-tcp-updown

Conversation

@andrewvc
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Pinging @elastic/uptime

Comment thread heartbeat/reason/reason.go Outdated
@andrewvc
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor

@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
Copy Markdown

@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.

andrewvc added 2 commits March 6, 2019 12:18
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