Skip to content

Conversation

@mayrstefan
Copy link
Contributor

General information

The hardware inventory uses the graphic card name as unique key. If multiple cards with the same name are present only one card is inventorized. The section already includes the PCI slot which would be a better key to the dictionary of present graphic cards.

Bug reports

See https://forum.checkmk.com/t/linux-inventory-plugin-shows-one-card-of-such-type-but-server-has-eight/55985

To reproduce

  • Start Docker container checkmk/check-mk-raw:2.4.0-latest (currently Checkmk Raw Edition 2.4.0p13)
  • Create dummy plugin (e.g. /usr/lib/check_mk_agent/plugins/vga) to represent multiple video cards in this container:
#!/bin/bash
cat <<EOF
<<<lnx_video:sep(58)>>>
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller])
        Subsystem: Hightech Information System Ltd. Device 200b
        Kernel driver in use: hyperv_drm
00:08.1 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller])
        Subsystem: Hightech Information System Ltd. Device 200c
        Kernel driver in use: hyperv_drm
00:08.2 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller])
        Subsystem: Hightech Information System Ltd. Device 200d
        Kernel driver in use: hyperv_drm
00:08.3 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA (prog-if 00 [VGA controller])
        Subsystem: Hightech Information System Ltd. Device 200e
        Kernel driver in use: hyperv_drm
05:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Cape Verde PRO [Radeon HD 7700 Series] (prog-if 00 [VGA controller])
        Subsystem: Hightech Information System Ltd. Device 200b
        Kernel driver in use: fglrx_pci
EOF
  • add localhost as host in CheckMK
  • look at the inventory of localhost: only 2 instead of 5 expected graphic cards are listed

Proposed changes

Add the PCI slot to the inventory and use slot instead of name as key in the internal dictionary.

@github-actions
Copy link

Thank you for your contribution. This pull request has been marked as stale as it has not passed the automated tests and there was no activity for the last 14 days.
Please take a look at the ‘Checks’ section for details on the test results and make the necessary changes.

This pull request will be closed due to inactivity after 60 days, if no action is taken.

@github-actions github-actions bot added the Stale Scheduled for auto-close label Oct 27, 2025
@mayrstefan
Copy link
Contributor Author

A CI check failed during setup. Can this be retriggered without an additional commit?

@github-actions github-actions bot removed the Stale Scheduled for auto-close label Nov 3, 2025
@mayrstefan mayrstefan force-pushed the fix-multiple-vga-cards branch 3 times, most recently from ac6c16e to 6063832 Compare November 9, 2025 10:05
@mayrstefan
Copy link
Contributor Author

Is this fixable in test-format:

ERROR: /home/runner/work/checkmk/checkmk/bazel/tools/format/BUILD:56:16: //bazel/tools/format:format_C++_with_clang-format.check depends on @@llvm_linux_x86_64+//:bin/clang-format in repository @@llvm_linux_x86_64+ which failed to fetch. no such package '@@llvm_linux_x86_64+//': java.io.IOException: Error extracting /home/runner/.cache/bazel/_bazel_runner/aed53f964069daa6ab471b6b9883c077/external/llvm_linux_x86_64+/temp2722159911779553489/LLVM-19.1.7-Linux-X64.tar.xz to /home/runner/.cache/bazel/_bazel_runner/aed53f964069daa6ab471b6b9883c077/external/llvm_linux_x86_64+/temp2722159911779553489: write (No space left on device)

@mayrstefan mayrstefan force-pushed the fix-multiple-vga-cards branch from 6063832 to 8596bbe Compare November 9, 2025 10:54
@mayrstefan mayrstefan force-pushed the fix-multiple-vga-cards branch from 8596bbe to 7fc3a74 Compare November 9, 2025 11:02
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