glpi-project / glpi-agent

GLPI Agent
GNU General Public License v2.0
212 stars 51 forks source link

No effect on configuration when "Tag" is set in agent.cfg #662

Closed noszone closed 1 month ago

noszone commented 1 month ago

Bug reporting acknowledgment

Yes, I read it

Professional support

Yes, I know

Describe the bug

if during installation of agent, the tag is not set. Then, in agent.cfg when set the value of key, it does not give an effect. It's not showing on server side. Only if set in windows registry, the tag can appear.

To reproduce

  1. Install agent with empty tag value
  2. Set Tag value in agent.cfg
  3. Run inventory task
  4. On Server side the agent tag field is empty

Expected behavior

When key Tag set in agent.cfg, after inventory task it must appear on server side in agent tag field.

Operating system

Windows

GLPI Agent version

1.7.3

GLPI version

10.0.14, Not applicable

GLPIInventory plugin or other plugin version

No response

Additional context

GLPI version 10.0.15

g-bougard commented 1 month ago

Hi @noszone

this is normal: on windows, by default, configuration is taken from registry where it is from agent.cfg on other OS.

If you want to take it from a file, you can start agent manually with the following parameters: --config-file=<path-to>/agent.cfg

And indeed, this is exactly what is done when you uses the portable version.