glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
43 stars 24 forks source link

Change agent name according to pc name change #483

Closed kintaro1981 closed 4 months ago

kintaro1981 commented 4 months ago

Describe the bug

If a PC changes name the agent is still named with the old name.

This can be missleading, usually when you search for a the pc name in a agent dropdown.

The only way to solved this is uninstall and install again glpi-agent

or maybe the uninstall is not needed with install with REINSTALL=feat_AGENT?

To reproduce

Install glpi-agent and run an inventory Change pc name and reboot the pc Now pc name and agent name are not in sync

Expected behavior

After a pc name change the next inventory changes the agent name too.

Operating system

Windows

GLPI Agent version

1.5

GLPI version

Other (See additional context below)

GLPIInventory plugin

1.3.4

Additional context

GLPI Version 10.0.12

trasher commented 4 months ago

In the produced XML file, what's the agent name?

g-bougard commented 4 months ago

Hi @kintaro1981

to reset the agent name, you just need to remove the C:\Program Files\GLPI-Agent\var\GLPI-Agent.dump` file and restart the service. That file will be generated again with an updated name.