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 '_monitoring' suffix to monitoring process names #27852

Merged
merged 4 commits into from
Sep 10, 2021

Conversation

michel-laterman
Copy link
Contributor

What does this PR do?

Add '_monitoring' suffix to monitoring process names so that they can be
distinguished from other processes. This is relevant for the status
command where the beat instances appear the same in output. Changed the
output format of the human readable option to better align text with the
longer names.

Why is it important?

Allows users to determine if the monitoring instances, or "regular" beats instances are healthy.

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

run elastic-agent status

Related issues

Logs

Example of the new output:

bash-4.2$ elastic-agent status
Status: HEALTHY
Message: (no message)
Applications:
  * metricbeat_monitoring  (HEALTHY)
                           Running
  * filebeat               (HEALTHY)
                           Running
  * metricbeat             (HEALTHY)
                           Running
  * filebeat_monitoring    (HEALTHY)
                           Running

Add '_monitoring' suffix to monitoring process names so that they can be
distinguised from other processes. This is relevent for the status
command where the beat instances appear the same in output. Changed the
output format of the human readable option to better align text with the
longer names.
@michel-laterman michel-laterman added bug Team:Elastic-Agent Label for the Agent team v7.16.0 backport-v7.16.0 Automated backport with mergify labels Sep 9, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 9, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 10, 2021

💚 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: 2021-09-10T18:45:23.194+0000

  • Duration: 84 min 5 sec

  • Commit: d5081bf

Test stats 🧪

Test Results
Failed 0
Passed 7044
Skipped 16
Total 7060

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 7044
Skipped 16
Total 7060

Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Change LGTM, left one question.

It would be nice to have tests in place for the different output formats. In case we could use golden files or similar it would make changes like this every easy to review on what the exact change is it has on the output.

}

if p.ServicePort() == 0 {
// Applications without service ports defined are ran as through the process application type.
a, err = process.NewApplication(
o.bgContext,
p.ID(),
p.BinaryName(),
appName,
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this has any effect in other places except the status output? Hopefully a positive impact but we should double check in case we do any comparison on appName.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what I can see it should be safe to change it like this, the Application that is returned exposes it for use by other processes with the Name function

@michel-laterman michel-laterman merged commit eb0a886 into elastic:master Sep 10, 2021
@michel-laterman michel-laterman deleted the status-names branch September 10, 2021 22:05
mergify bot pushed a commit that referenced this pull request Sep 10, 2021
* Add '_monitoring' suffix to monitoring process names

Add '_monitoring' suffix to monitoring process names so that they can be
distinguished from other processes. This is relevant for the status
command where the beat instances appear the same in output. Changed the
output format of the human readable option to better align text with the
longer names.

(cherry picked from commit eb0a886)
michel-laterman added a commit that referenced this pull request Sep 11, 2021
* Add '_monitoring' suffix to monitoring process names

Add '_monitoring' suffix to monitoring process names so that they can be
distinguished from other processes. This is relevant for the status
command where the beat instances appear the same in output. Changed the
output format of the human readable option to better align text with the
longer names.

(cherry picked from commit eb0a886)

Co-authored-by: Michel Laterman <[email protected]>
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
* Add '_monitoring' suffix to monitoring process names

Add '_monitoring' suffix to monitoring process names so that they can be
distinguished from other processes. This is relevant for the status
command where the beat instances appear the same in output. Changed the
output format of the human readable option to better align text with the
longer names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.16.0 Automated backport with mergify bug Team:Elastic-Agent Label for the Agent team v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[elastic-agent] Improve status output for different applications
3 participants