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

[metricbeat][system/process, system/process_summary]: mark module as healthy if metrics are partially filled #40565

Merged
merged 7 commits into from
Aug 23, 2024

Conversation

VihasMakwana
Copy link
Contributor

@VihasMakwana VihasMakwana commented Aug 20, 2024

  • Bug

Proposed commit message

  • If metrics are partially available for system.process and system.process_summary, do not mark metricset as degraded.
  • Instead, keep it healthy and display the message

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

  • Clone from this branch
  • Do mage package from x-pack/agentbeat
  • Run elastic agent with new agentbeat binary
  • Run as unprivileged mode, and run elastic-agent status --output=json
  • You should see HEALTHY state and error message displayed

Related issues

Use cases

Screenshots

Screenshot 2024-08-22 at 12 38 05 PM Screenshot 2024-08-22 at 12 38 13 PM

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 20, 2024
Copy link
Contributor

mergify bot commented Aug 20, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @VihasMakwana? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Aug 21, 2024
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 21, 2024
@VihasMakwana VihasMakwana changed the title chore: mark module as healthy if metrics are partially filled [metricbeat][system/beat]: mark module as healthy if metrics are partially filled Aug 22, 2024
@VihasMakwana VihasMakwana marked this pull request as ready for review August 22, 2024 05:51
@VihasMakwana VihasMakwana requested a review from a team as a code owner August 22, 2024 05:51
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@VihasMakwana VihasMakwana requested review from leehinman and removed request for rdner August 22, 2024 05:57
@VihasMakwana VihasMakwana changed the title [metricbeat][system/beat]: mark module as healthy if metrics are partially filled [metricbeat][system/process, system/process_summary]: mark module as healthy if metrics are partially filled Aug 22, 2024
@leehinman
Copy link
Contributor

Needs a changelog entry

metricbeat/mb/event.go Outdated Show resolved Hide resolved
Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Copy link
Contributor

mergify bot commented Aug 23, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b show-healthy-if-partial upstream/show-healthy-if-partial
git merge upstream/main
git push upstream show-healthy-if-partial

@VihasMakwana VihasMakwana added the backport-8.15 Automated backport to the 8.15 branch with mergify label Aug 23, 2024
@VihasMakwana VihasMakwana merged commit 1f033c9 into elastic:main Aug 23, 2024
29 checks passed
mergify bot pushed a commit that referenced this pull request Aug 23, 2024
…healthy if metrics are partially filled (#40565)

* chore: mark module as healthy if metrics are partially filled

* chore: mark module as healthy if metrics are partially filled

* fix: use errors.As

* fix: fix lint

* Update metricbeat/mb/event.go

Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>

* fix: changelog

---------

Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
(cherry picked from commit 1f033c9)

# Conflicts:
#	metricbeat/mb/module/wrapper.go
#	metricbeat/module/system/process_summary/process_summary.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.15 Automated backport to the 8.15 branch with mergify bug Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
6 participants