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

Cloudbeat args v2 alignment #1763

Merged
merged 2 commits into from
Dec 6, 2022

Conversation

oren-zohar
Copy link
Contributor

What does this PR do?

Align cloudbeat spec argument to other beats, as v2 now don't send those arguments if they are missing.

Why is it important?

In v2 (8.6.0) we will not pass the log level as an argument since it's missing from the spec.

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.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2022

This pull request does not have a backport label. Could you fix it @oren-zohar? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

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

NOTE: backport-skip has been added to this pull request.

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 21, 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-11-29T13:53:56.843+0000

  • Duration: 18 min 24 sec

Test stats 🧪

Test Results
Failed 0
Passed 4613
Skipped 13
Total 4626

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages.

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 21, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 98.333% (59/60) 👍
Files 69.082% (143/207) 👍
Classes 69.133% (271/392) 👍
Methods 53.8% (814/1513) 👍
Lines 39.044% (8795/22526) 👎 -0.049
Conditionals 100.0% (0/0) 💚

@mergify
Copy link
Contributor

mergify bot commented Nov 28, 2022

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 cloudbeat-args-alignment upstream/cloudbeat-args-alignment
git merge upstream/main
git push upstream cloudbeat-args-alignment

@oren-zohar oren-zohar added backport-v8.6.0 Automated backport with mergify and removed backport-skip labels Nov 29, 2022
@oren-zohar oren-zohar marked this pull request as ready for review November 29, 2022 18:40
@oren-zohar oren-zohar requested a review from a team as a code owner November 29, 2022 18:40
@oren-zohar oren-zohar requested review from AndersonQ and michel-laterman and removed request for a team November 29, 2022 18:40
@oren-zohar
Copy link
Contributor Author

oren-zohar commented Dec 5, 2022

Verified and it seems like logging.level is propagating as expected:

root@kind-multi-control-plane:/usr/share/elastic-agent# ps aux | grep logging.level
root        2482  0.5  1.3 1491544 112412 ?      Sl   21:47   0:01 /usr/share/elastic-agent/data/elastic-agent-496e7e/components/cloudbeat -E setup.ilm.enabled=false -E setup.template.enabled=false -E logging.to_stderr=true -E management.enabled=true -E logging.level=info -E gc_percent=${CLOUDBEAT_GOGC:100} -E http.enabled=true -E http.host=unix:///usr/share/elastic-agent/state/data/tmp/cloudbeat-cis_k8s-default.sock -E path.data=/usr/share/elastic-agent/state/data/run/cloudbeat/cis_k8s-default
root        2492  0.4  1.2 1508488 96556 ?       Sl   21:47   0:01 /usr/share/elastic-agent/data/elastic-agent-496e7e/components/filebeat -E setup.ilm.enabled=false -E setup.template.enabled=false -E management.enabled=true -E logging.level=info -E logging.to_stderr=true -E gc_percent=${FILEBEAT_GOGC:100} -E filebeat.config.modules.enabled=false -E http.enabled=true -E http.host=unix:///usr/share/elastic-agent/state/data/tmp/log-default.sock -E path.data=/usr/share/elastic-agent/state/data/run/log-default
root        2504  0.8  1.5 1621756 122364 ?      Sl   21:47   0:03 /usr/share/elastic-agent/data/elastic-agent-496e7e/components/metricbeat -E setup.ilm.enabled=false -E setup.template.enabled=false -E management.enabled=true -E logging.level=info -E logging.to_stderr=true -E gc_percent=${METRICBEAT_GOGC:100} -E metricbeat.config.modules.enabled=false -E http.enabled=true -E http.host=unix:///usr/share/elastic-agent/state/data/tmp/system-metrics-default.sock -E path.data=/usr/share/elastic-agent/state/data/run/system/metrics-default
root        2515  0.5  1.2 1582220 99840 ?       Sl   21:47   0:01 /usr/share/elastic-agent/data/elastic-agent-496e7e/components/filebeat -E setup.ilm.enabled=false -E setup.template.enabled=false -E management.enabled=true -E logging.level=info -E logging.to_stderr=true -E gc_percent=${FILEBEAT_GOGC:100} -E filebeat.config.modules.enabled=false -E http.enabled=true -E http.host=unix:///usr/share/elastic-agent/state/data/tmp/filestream-monitoring.sock -E path.data=/usr/share/elastic-agent/state/data/run/filestream-monitoring
root        2525  0.3  1.4 1547512 113956 ?      Sl   21:47   0:01 /usr/share/elastic-agent/data/elastic-agent-496e7e/components/metricbeat -E setup.ilm.enabled=false -E setup.template.enabled=false -E management.enabled=true -E logging.level=info -E logging.to_stderr=true -E gc_percent=${METRICBEAT_GOGC:100} -E metricbeat.config.modules.enabled=false -E http.enabled=true -E http.host=unix:///usr/share/elastic-agent/state/data/tmp/beat-metrics-monitoring.sock -E path.data=/usr/share/elastic-agent/state/data/run/beat/metrics-monitoring
root        2536  0.2  1.4 1547512 113032 ?      Sl   21:47   0:01 /usr/share/elastic-agent/data/elastic-agent-496e7e/components/metricbeat -E setup.ilm.enabled=false -E setup.template.enabled=false -E management.enabled=true -E logging.level=info -E logging.to_stderr=true -E gc_percent=${METRICBEAT_GOGC:100} -E metricbeat.config.modules.enabled=false -E http.enabled=true -E http.host=unix:///usr/share/elastic-agent/state/data/tmp/http-metrics-monitoring.sock -E path.data=/usr/share/elastic-agent/state/data/run/http/metrics-monitoring
root        2628  0.0  0.0   2844   616 pts/0    S+   21:54   0:00 grep --color=auto logging.level

Yet I still encounter a different issue, it seems like the log level is not propagating from the fleet UI (for all beats, not only cloudbeat) is this a known issue @cmacknz? this seems like a pretty big issue but maybe I'm missing something here.

In any case, this PR is still needed in order to add the log-level argument to cloudbeat process arguments, I think we can merge @cmacknz @AndersonQ

@cmacknz
Copy link
Member

cmacknz commented Dec 6, 2022

Merging, logs issue is tracked in #1896

@cmacknz cmacknz merged commit 6f2d687 into elastic:main Dec 6, 2022
mergify bot pushed a commit that referenced this pull request Dec 6, 2022
(cherry picked from commit 6f2d687)
@oren-zohar oren-zohar deleted the cloudbeat-args-alignment branch December 6, 2022 19:16
cmacknz pushed a commit that referenced this pull request Dec 6, 2022
(cherry picked from commit 6f2d687)

Co-authored-by: Oren Zohar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.6.0 Automated backport with mergify skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants