Getting USB Mapped Device Status using API/cli

Sherbs

New Member
Jul 10, 2024
5
1
3
I use USB Mapped devices in Proxmox VE. This works fine as expected. Sometimes on of the connected devices fail. In the Proxmox GUI I can see the failed / disconnected device in the "Status" field.

See example in attachement.

Is there a possibility to get the same status value using the API/cli (pvesh) command for machine readable values?

When I use according to the API Doc https://pve.proxmox.com/pve-docs/api-viewer/index.html#/cluster/mapping/usb/{id}
pvesh get /cluster/mapping/usb/{id}

I only get the mapping information but not the status information.

Goal: I want to monitor the status of all connected USB devices and raise an alarm if a status error is encountered so the issue can be identified & fixed quickly.

Any ideas? Thanks!
 

Attachments

  • proxmox_usb_mapping_error.png
    proxmox_usb_mapping_error.png
    18.1 KB · Views: 5
Hi Christoph, thanks for your reply.

Your suggested query works, however I still do not get the status information (see example). Output provides correct mapping information but no status information (OK or, like in this case, with an incorrect configuration).

Any suggestions on how to access this information?
 

Attachments

  • proxmox_usb_mapping_error2.png
    proxmox_usb_mapping_error2.png
    15.8 KB · Views: 2