Skip to content

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

Merged
VihasMakwana merged 7 commits intoelastic:mainfrom
VihasMakwana:show-healthy-if-partial
Aug 23, 2024
Merged

[metricbeat][system/process, system/process_summary]: mark module as healthy if metrics are partially filled#40565
VihasMakwana merged 7 commits intoelastic:mainfrom
VihasMakwana:show-healthy-if-partial

Conversation

@VihasMakwana
Copy link
Copy Markdown
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
@mergify
Copy link
Copy Markdown
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
@VihasMakwana VihasMakwana requested review from mauri870 and rdner August 22, 2024 05:51
@elasticmachine
Copy link
Copy Markdown
Contributor

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
@pierrehilbert pierrehilbert requested a review from faec August 22, 2024 07:39
@leehinman
Copy link
Copy Markdown
Contributor

Needs a changelog entry

Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
@VihasMakwana VihasMakwana requested a review from mauri870 August 23, 2024 07:19
@mergify
Copy link
Copy Markdown
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
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

Development

Successfully merging this pull request may close these issues.

[Elastic Agent] The system process metricsets should not report as degraded when metrics are partially collected

6 participants