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

source/system: Add reading product name information #1871

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/usage/customization-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,7 @@ The following features are available for matching:
| | | **`<parameter>`** | string | One parameter from `/etc/os-release` |
| **`system.dmiid`** | attribute | | | DMI identification data from `/sys/devices/virtual/dmi/id/` |
| | | **`sys_vendor`** | string | Vendor name from `/sys/devices/virtual/dmi/id/sys_vendor` |
| | | **`product_name`** | string | Product name from `/sys/devices/virtual/dmi/id/product_name` |
| **`system.name`** | attribute | | | System name information |
| | | **`nodename`** | string | Name of the kubernetes node object |
| **`usb.device`** | instance | | | USB devices present in the system |
Expand Down
2 changes: 1 addition & 1 deletion source/system/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (s *systemSource) Discover() error {
}

// Get DMI ID attributes
dmiIDAttributeNames := []string{"sys_vendor"}
dmiIDAttributeNames := []string{"sys_vendor", "product_name"}
dmiAttrs := make(map[string]string)
for _, name := range dmiIDAttributeNames {
val, err := getDmiIDAttribute(name)
Expand Down