glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
46 stars 27 forks source link

feature request: wildcard support on registry collector #331

Closed ftoledo closed 1 year ago

ftoledo commented 1 year ago

Describe the bug

we have to collect if windows machine need reboot the registry path is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired

key name: {some guid XXXX-XXXXX-XXXXX} value: any chance to get severals keys from registry? using only the path?

imagen

To reproduce

create a task tha have a registry collector job

Expected behavior

get each key=>value pair from path set

Operating system

Linux

GLPI Agent version

1.4

GLPI version

10.0.6

GLPIInventory plugin

1.1.0

Additional context

I notice that path settings "auto add" slashes

I set the path: SYSTEM\CurrentControlSet\Control\Session Manager

It's show: /SYSTEM\CurrentControlSet\Control\Session Manager/

g-bougard commented 1 year ago

Hi @ftoledo

this is indeed still supported.

I just tested again but with HKEY_LOCAL_MACHINE/SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Power/ as I don't have any entry for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired at the moment of my test.

Here is the definition: image And the result in the "Collect information" of the test machine: image

The section should be empty if no key is found.

As I used a nightly build for the test, try eventually a nightly build of glpi-agent.

g-bougard commented 1 year ago

Maybe avoid the last \ in your key definition.