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

Enhance Host Identification and Metadata Fetching in MachineInfoUtil #1989

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

quzard
Copy link
Collaborator

@quzard quzard commented Dec 24, 2024

This pull request introduces several changes to the MachineInfoUtil module, focusing on enhancing the handling of host identification and metadata fetching. The key changes include the addition of new functions for serial number retrieval, improvements to the ECS metadata fetching process, and the introduction of a new host ID tag.

Enhancements to host identification:

  • core/common/MachineInfoUtil.cpp: Added functions GetSerialNumberFromEcsAssist, GetEcsAssistMachineIdFile, GetLocalHostId, and FetchHostId to improve host identification and retrieval of the serial number from ECS assist.
  • core/constants/Constants.cpp, core/constants/Constants.h: Introduced a new constant LOG_RESERVED_KEY_HOSTID for logging the host ID. [1] [2]
  • core/plugin/processor/inner/ProcessorTagNative.cpp: Added a feature to enable host ID tagging in logs when the enable_host_id flag is set. [1] [2]

Improvements to metadata fetching:

  • core/common/MachineInfoUtil.cpp: Enhanced the FetchECSMeta function to include token-based authentication and improved error handling during metadata retrieval.

Code organization and cleanup:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant