Skip to content

[8.x](backport #5941) Add os_family, os_platform and os_version to host provider#6005

Merged
belimawr merged 2 commits into8.xfrom
mergify/bp/8.x/pr-5941
Nov 18, 2024
Merged

[8.x](backport #5941) Add os_family, os_platform and os_version to host provider#6005
belimawr merged 2 commits into8.xfrom
mergify/bp/8.x/pr-5941

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Nov 12, 2024

What does this PR do?

This commit adds os_family, os_platform and os_version to the host provider, enabling differentiating Linux distributions. This is required to support Debian 12 and other distributions that are moving away from traditional log files in favour of Journald.

Why is it important?

It is required to support Debian 12 and other Linux distributions that are moving away from traditional log files in favour of Journald.

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/fragments using the changelog tool
  • [ ] I have added an integration test or an E2E test

Disruptive User Impact

None

How to test this PR locally

  1. Package the Elastic-Agent
  2. Deploy it with any policy, even an empty policy with no monitoring will work
  3. Collect the diagnostics
  4. Look at variables.yml and ensure os_family, os_platform and os_version are populated under host. Here is an example from Debian 11:
      host:
        architecture: x86_64
        id: 9a7aa218396d47b1b17218a99918bae4
        ip:
            - 127.0.0.1/8
            - 10.0.2.15/24
            - ::1/128
            - fe80::a00:27ff:fe8d:c04d/64
        mac:
            - 08:00:27:8d:c0:4d
        name: bullseye
        os_family: debian
        os_platform: debian
        os_version: 11 (bullseye)
        platform: linux

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

This is an automatic backport of pull request #5941 done by [Mergify](https://mergify.com).

This commit adds `os_family`, `os_platform` and `os_version` to the host provider, enabling differentiating Linux distributions. This is required to support Debian 12 and other distributions that are moving away from traditional log files in favour of Journald.

---------

Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
(cherry picked from commit d9587c4)
@mergify mergify bot added the backport label Nov 12, 2024
@mergify mergify bot requested a review from a team as a code owner November 12, 2024 19:49
@mergify mergify bot removed the request for review from a team November 12, 2024 19:49
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Nov 18, 2024

This pull request has not been merged yet. Could you please review and merge it @belimawr? 🙏

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Nov 18, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@pierrehilbert pierrehilbert requested review from belimawr and removed request for michalpristas and michel-laterman November 18, 2024 16:43
@elastic-sonarqube
Copy link
Copy Markdown

@belimawr belimawr merged commit 1cd7ab4 into 8.x Nov 18, 2024
@belimawr belimawr deleted the mergify/bp/8.x/pr-5941 branch November 18, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 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.

3 participants