Wrong import meshcentral ID
Bug reporting acknowledgment
Yes, I read it
Professional support
None
Describe the bug
Hello, the problem is wrong import meshcentral ID - "HKEY_LOCAL_MACHINE/SOFTWARE/Open Source/Mesh Agent/NodeId" instead of "HKEY_LOCAL_MACHINE/SOFTWARE/Open Source/MeshAgentService/NodeId" in MeshCentral.pm
To reproduce
- Get inventory data form Win PC with actual meshcentral agent
Expected behavior
Get ID form HKEY_LOCAL_MACHINE/SOFTWARE/Open Source/MeshAgentService/NodeId
Operating system
Windows
GLPI Agent version
v1.15
GLPI version
11.0.0-beta
GLPIInventory plugin or other plugin version
GLPI Inventory v1.5.3
Additional context
Could you change MeshCentral.pm?
path => "HKEY_LOCAL_MACHINE/SOFTWARE/Open Source/Mesh Agent/NodeId", to
path => "HKEY_LOCAL_MACHINE/SOFTWARE/Open Source/MeshAgentService/NodeId",
or add some option for select source of ID: --MeshAgentService=0 for "Mesh Agent/NodeId", or 1 for "MeshAgentService/NodeId"
Hi @DimitryVo
you ask to change the NodeId registry key path but as far I know this path worked in the past.
Do you mean the patch was changed in the upstream project ? If yes, can you point us to a page explaining why the change occurred and eventually when? Behind, we have to decide if we indeed have to change to add the new path as a fallback for newer versions or if it comes from another project for which the path was changed. We don't want to impact current users if they have agents still using the currently used path.
Hello, you can use "MeshAgentService/NodeId" for open meshcentral link to selected computer. The "Mesh Agent/NodeId" is wrong. You can use --MeshAgentService=0 as default and 1 for correction.
Hello,
sorry, you don't really answer my question. I won't change the code if this means older MeshCentral agent version are no more recognized.
And you have to point me to some official documentation which explains and/or justify your assertions. As far as I can't test/verify myself you're right, you have to provide trust-able sources of information. What if you're a malicious person trying to make MeshCentral no more detected by glpi-agent ? Of course I'm think you're not, but It's always my responsibility to be careful with information I can't verify myself.
Hello, we have checked it at real project without doc of meshcetral by compare NodeId and link from mc. May by other users or mc forum accurate it. Possible, using default option --MeshAgentService=0 or without it for get "Mesh Agent/NodeId" does not have risk. Who need will use option --MeshAgentService=1 or --MeshAgentService for get MeshAgentService/NodeId. I can attach reg file, if it help for decision.
Hi,
looking at MeshAgent project, I can see this line: https://github.com/Ylianst/MeshAgent/blob/add1d7fef3b341a3474fbce86cdab54ddcde2af9/modules/agent-selftest.js#L225
It suggests me looking at your request the "servicename" variable is not the same for you: it was changed from "Mesh Agent" to "MeshAgentService". The question is to know if this is a user change (as it seems this can be set with a user parameter) or if the default was changed in a new version. If it's a change to the default, I have to handle a fallback. So do you know why it changed in your context ?
Also, in that file: https://github.com/Ylianst/MeshAgent/blob/master/meshservice/ServiceMain.c#L1336 I can see "meshServiceName" can be set somewhere but the default remains "Mesh Agent".
In your previous comment, you speak about a --MeshAgentService option. Where this option is documented ? I see no reference to that string into Ylianst repositories.
It seems to me people can change the way MeshCentral is integrated. The real question is to find the right algorithm to check for a MeshAgent. Actually, replacing the registry key as you request seems not the right way of doing.