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

Only log the disablement of send_status once #448

Merged
merged 2 commits into from
Oct 4, 2022
Merged

Conversation

mpfz0r
Copy link
Contributor

@mpfz0r mpfz0r commented Sep 29, 2022

Notes for Reviewers

  • The commit history must be preserved - please use the rebase-merge or standard merge option instead of squash-merge
  • Sync up with the author before merging

@mpfz0r mpfz0r requested a review from thll September 29, 2022 17:38
@@ -209,8 +209,11 @@ func UpdateRegistration(httpClient *http.Client, checksum string, ctx *context.C
respBody := new(graylog.ResponseCollectorRegistration)
resp, err := c.Do(r, &respBody)
if resp != nil && resp.StatusCode == 400 && strings.Contains(err.Error(), "Unable to map property") {
Copy link
Member

Choose a reason for hiding this comment

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

This comment is not about your change but the behavior of the sidecar here. Do you know why we disable the status if we detect the substring in the error message?

If the substring would indicate "send_status" not working, then the log wouldn't show up more than once because we disabled the status submission. Or do I miss anything?

I also don't understand the "Disabling send_status as fallback." message. What does fallback mean here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm guessing this was put in place to deal with older servers that didn't support status requests.
It catches the generic jackson error about unknown properties.

The idea of the "fallback" was to register at least a minimal request from the sidecar.
otherwise it would not be registered at all.

I've also made a change to the server that relaxes the NodeDetails with @JsonIgnoreProperties(ignoreUnknown = true)

@thll thll merged commit adfc83a into master Oct 4, 2022
@thll thll deleted the improve-send_status-log branch October 4, 2022 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants