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

Have syscollector collect/obtain the device serial number #5699

Open
fernandogont opened this issue Jul 18, 2023 · 1 comment
Open

Have syscollector collect/obtain the device serial number #5699

fernandogont opened this issue Jul 18, 2023 · 1 comment
Labels
level/task Task issue reporter/community Issue reported by the community type/enhancement Enhancement issue

Comments

@fernandogont
Copy link

Description

One of the most important identifiers in a workstation or system is its serial number. However, it seems syscollerctor fails to collect it.

In Linux, you can get this information via:
sudo dmidecode -t system

In MacOS, you can collect this information via:
system_profiler SPHardwareDataType

Tasks

The steps that have to be completed in order to close the issue.

  • [Collect serial number in Linux systems]
  • [Collect serial number for Window systems ]
  • [Collect the serial number for MacOS systems]

Additional information

As noted before, this is how you can collect the aforementioned information:

In Linux, you can get this information via:
sudo dmidecode -t system

In MacOS, you can collect this information via:
system_profiler SPHardwareDataType

@Dwordcito
Copy link
Member

Dwordcito commented Jul 19, 2023

Hi @fernandogont

It's nice to receive this comment from you!

This data is currently being collected by syscollector, moreover, this data is the primary key of the hardware info table.

What happens here is that this data is not being shown, therefore it is correct where I created the issue!

Linux implementation
https://github.com/wazuh/wazuh/blob/ffa66c34698cb12b52161b022f69e3f5f02a1229/src/data_provider/src/sysInfoLinux.cpp#L138
MacOS implementation
https://github.com/wazuh/wazuh/blob/ffa66c34698cb12b52161b022f69e3f5f02a1229/src/data_provider/src/hardware/hardwareWrapperImplMac.h#L36
Windows implementation
https://github.com/wazuh/wazuh/blob/ffa66c34698cb12b52161b022f69e3f5f02a1229/src/data_provider/src/sysInfoWin.cpp#L436

Here you can see how to obtain this information from the API
https://documentation.wazuh.com/current/user-manual/api/reference.html#operation/api.controllers.syscollector_controller.get_hardware_info

@AlexRuiz7 AlexRuiz7 added the reporter/community Issue reported by the community label Aug 3, 2023
@gdiazlo gdiazlo added type/enhancement Enhancement issue level/task Task issue type/bug Bug issue and removed type/enhancement Enhancement issue labels Aug 3, 2023
@gdiazlo gdiazlo added type/enhancement Enhancement issue and removed type/bug Bug issue labels Aug 21, 2023
@JuanGarriuz JuanGarriuz self-assigned this May 14, 2024
@JuanGarriuz JuanGarriuz removed their assignment Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue reporter/community Issue reported by the community type/enhancement Enhancement issue
Projects
None yet
Development

No branches or pull requests

5 participants