You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2024-02-09 14:54:55

klockk
Member
Registered: 2024-02-09
Posts: 4

GLPI Agent remote inventory

Hi!

I'm sure I am the problem, but I can't understand how agentless remote inventory should work.
I'm using the latest 10.0.12 GLPI release and the agent I'm working with is 1.7.1 (Toolbox plugin v1.3)

I'm trying to achieve the following:
Have the agent installed only on one computer. I might increase this number but right now for testing purposes it's only one computer with 1 agent.
I configured every IP range that I want to scan in the future and right now I'm focused on machines running Windows10/11.
The IP range have correct winrm credentials and I can establish connections to these machines from where the agent is running.

For example:
My computer that has the agent installed is 192.168.0.2
I created an IP range in the toolbox with only one computer in it for testing purposes: 192.168.0.130

When I create a network scan task with said IP range with correct winrm credentials, I can see that the authentication is successful, the scan goes trough everything, but in the very end I get one error:

"glpi [error] #1, [http client] 1F892DBF: no valid agentid set on HTTP client"

This is the only error that I'm getting, everything else is either info/debug/debug2 category.
After this the machine does not appear in the web GUI.

However, when I added this machine to the "Remotes" with glpi-remote like this: glpi-remote add winrm://localuser:localuserpassword@192.168.0.130 --target server0
And I went to the glpi web GUI, searched for the only agent I have and pressed "Request inventory" it did an inventory on the machine itself (192.168.0.2) and at the same time it started to inventory 192.168.0.130 too.
After it was done I could see that 192.168.0.2 was updated and finally 192.168.0.130 appeared under assets->computers.

Is this the only way to do this "agentless" remote inventory?
Because in the toolbox->inventory tasks the only two types we can choose from are "Network scan" and "Local inventory".
When I'm running the task it says running network scan, but the time this agentless inventory worked the task was called remote inventory.

So in short my question is: Is the toolbox only good for SNMP devices? If so, why is there an option to add ssh and winrm credentials?

Offline

#2 2024-02-10 16:45:39

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: GLPI Agent remote inventory

The toolbox can be used with SSH, SNMP and WinRM.
You can see this in the official video from Teclib' covering using the Toolbox app for remote inventory.
https://www.youtube.com/watch?v=mM45fIim-SY


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2024-02-10 17:18:17

klockk
Member
Registered: 2024-02-09
Posts: 4

Re: GLPI Agent remote inventory

Thank you for the response.
I've seen that video, it might be even the first one I checked to see how the agent works.

My main problem is after running scans from the toolbox i get the error:

glpi [error] #1, [http client] 1F892DBF: no valid agentid set on HTTP client

There is no other error in the task's log, only this one near the end. I assume it's happening when the agent tries to send it to server0.
At the start i can see that it is scanning the correct IP and after that it uses the winrm credentials and the debug line ends with success:

[info] Starting W10TEST network scan task job...
[info] Running W10TEST task...
[debug] initializing job 1
[debug] initializing block 192.168.0.130-192.168.0.130
[debug] Current netdiscovery run expiration timeout: 15 minutes
[debug] using 1 netdiscovery worker
[debug] starting job 1 with 1 ip to scan using 5 workers
[debug] #1, scanning 192.168.0.130
[debug] #1, [http client] authentication required, submitting credentials
[debug] #1, [http client] authentication required, trying basic with admin user (WSMAN)
[debug] #1, - scanning 192.168.0.130 with winrm RemoteInventory, credentials [local admin]: success
[debug] #1, - scanning 192.168.0.130 with netbios: no result
[debug] #1, - scanning 192.168.0.130 with echo ping: success
[debug] #1, - scanning 192.168.0.130 in arp table: no result
[info] #1, New inventory from WIN10TEST-2024-02-08-10-37-36 for server0
[debug] #1, Running GLPI::Agent::Task::Inventory::AccessLog
... Rest of agent task inventory lines are running just fine

I don't understand why this doesn't work.
If there was some kind of misconfiguration between the agent and the server, then how did it work when I used the Toolbox's "Remote" option?
And I assume if the configuration is not correct it wouldn't inventory the machine the agent is installed on either, but that part works fine too.

Last edited by klockk (2024-02-10 17:21:12)

Offline

#4 2024-02-12 13:52:38

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: GLPI Agent remote inventory

I don't know anything more about the agent unfortunately. You may have better luck by reporting an issue on the GitHub.
https://github.com/glpi-project/glpi-agent/issues


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#5 2024-02-12 14:48:32

klockk
Member
Registered: 2024-02-09
Posts: 4

Re: GLPI Agent remote inventory

I see, thank you for trying to help anyways smile

We will move towards an other approach, we will install the agents on all windows machines. I might give this an another try in a few months with a newer agent.

In the meantime if anyone was able to inventory windows machines with only one agent via winrm and they could write it down how they managed to do it I would appreciate it.
(Not with glpi-remote, because that way it worked, but it would require me to add every single IP in a given range manually. I was trying to use the toolbox's inventory task on a given IP range)
Linux machines via ssh works as it should but windows don't.

Offline

Board footer

Powered by FluxBB