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

Add IsZero to CPU Totals, report value for monitoring #40

Merged
merged 5 commits into from
Jul 12, 2022

Conversation

fearful-symmetry
Copy link
Contributor

@fearful-symmetry fearful-symmetry commented Jul 6, 2022

What does this PR do?

This fixes three issues:

  • Gives CPUTotals an IsZero method, so we don't report {} fields during certain events
  • Fills out the Value field for GetSelf(), which is used by beats self-monitoring, and apparently that value is used by the elastic_agent dashboard.
  • Make processes fetched with GetSelf() persist across calls

@fearful-symmetry fearful-symmetry added bug Something isn't working Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team v8.4.0 labels Jul 6, 2022
@fearful-symmetry fearful-symmetry requested a review from a team as a code owner July 6, 2022 18:02
@fearful-symmetry fearful-symmetry self-assigned this Jul 6, 2022
@fearful-symmetry fearful-symmetry requested review from faec and leehinman and removed request for a team July 6, 2022 18:02
@cmacknz cmacknz self-requested a review July 6, 2022 18:10
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 6, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-07-12T17:28:30.500+0000

  • Duration: 10 min 26 sec

Test stats 🧪

Test Results
Failed 0
Passed 170
Skipped 3
Total 173

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@fearful-symmetry
Copy link
Contributor Author

Okay, tinkered with this a bit more. The logic that adds value the way it does is ancient, and I don't fully understand why it's like that, but for now I've just decided to add the value metric in a way that...seems more reasonable?

@cmacknz cmacknz requested review from belimawr and cmacknz July 7, 2022 14:26
@cmacknz cmacknz added the v8.3.0 label Jul 8, 2022
@cmacknz
Copy link
Member

cmacknz commented Jul 8, 2022

  1. Add a changelog entry for this and create a release+tag for this change.
  2. As a follow up create a beats PR updating this package, and then backport it to the 8.3 branch. There is going to be an 8.3.3 release this fix can go out in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team v8.3.0 v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants