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

More verbose error logs for collecting monitoring metrics #6429

Merged
merged 2 commits into from
Feb 21, 2018

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Feb 21, 2018

  • Log error message returned by Beats to the log line
  • Remove unwanted error message from conversion error reporting
  • Add more context to existing error messages

Closes #6426

Copy link
Contributor

@boaz0 boaz0 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@ph ph left a comment

Choose a reason for hiding this comment

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

Small comment concerning the original value and the error messages.

@@ -149,7 +149,7 @@ func getCPUUsage() (float64, *process.Ticks, error) {

totalCPUUsage, ok := iTotalCPUUsage.(float64)
if !ok {
return 0.0, nil, fmt.Errorf("error converting value of CPU usage since start")
return 0.0, nil, fmt.Errorf("error converting value of CPU usage since start to float64")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding the original value of totalCPUUsage to the message would be useful when debugging. Same with the other casting for this PR.

Copy link
Contributor

@ph ph left a comment

Choose a reason for hiding this comment

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

LGTM WFSG

@ph ph added the needs_backport PR is waiting to be backported to other branches. label Feb 21, 2018
@ph ph merged commit baa740d into elastic:master Feb 21, 2018
@ph
Copy link
Contributor

ph commented Feb 21, 2018

We will need that for 6.2 I have added the need_backport label.

kvch added a commit to kvch/beats that referenced this pull request Feb 21, 2018
* libbeat: more info error messages && fixes
* libbeat: add variable of failing conversion to message

(cherry picked from commit baa740d)
@kvch
Copy link
Contributor Author

kvch commented Feb 21, 2018

I removed the label, as backport pr has been opened.

@kvch kvch removed the needs_backport PR is waiting to be backported to other branches. label Feb 21, 2018
ph pushed a commit that referenced this pull request Feb 21, 2018
)

* libbeat: more info error messages && fixes
* libbeat: add variable of failing conversion to message

(cherry picked from commit baa740d)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…) (elastic#6437)

* libbeat: more info error messages && fixes
* libbeat: add variable of failing conversion to message

(cherry picked from commit e8c6e8b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants