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 2022-10-13 10:32:36

vogll
Member
Registered: 2022-09-22
Posts: 5

Unable to do remoteinventory

Hi,
I just register remote system to inventory, but I can't do the remote inventory from the agent.

root@Glpi:/# glpi-remote list
index  deviceid                 url                             target   Next run date
    1  pve-2022-10-13-08-55-16  ssh://root:****@192.168.12.5    server0  on next agent run

It seems to be disabled on the server side. I investigated the documentation with no success. Here is part of the agent log

Oct 13 10:21:19 Glpi glpi-agent[46707]: Logger backend Syslog initialized
Oct 13 10:21:19 Glpi glpi-agent[46707]: GLPI Agent (1.4-1)
Oct 13 10:21:19 Glpi glpi-agent[46707]: Configuration directory: /etc/glpi-agent
Oct 13 10:21:19 Glpi glpi-agent[46707]: Data directory: /usr/share/glpi-agent
Oct 13 10:21:19 Glpi glpi-agent[46707]: Storage directory: /var/lib/glpi-agent
Oct 13 10:21:19 Glpi glpi-agent[46707]: Lib directory: /usr/share/glpi-agent/lib
Oct 13 10:21:19 Glpi glpi-agent[46707]: [target local0] Next tasks run planned for Thu Oct 13 11:15:21 2022
Oct 13 10:21:19 Glpi glpi-agent[46707]: [target server0] Next server contact planned for Thu Oct 13 11:14:00 2022
Oct 13 10:21:19 Glpi glpi-agent[46707]: getAvailableTasks() : add of task Inventory version 1.12
Oct 13 10:21:19 Glpi glpi-agent[46707]: getAvailableTasks() : add of task NetDiscovery version 5.1
Oct 13 10:21:19 Glpi glpi-agent[46707]: getAvailableTasks() : add of task NetInventory version 5.1
Oct 13 10:21:19 Glpi glpi-agent[46707]: getAvailableTasks() : add of task RemoteInventory version 1.0
Oct 13 10:21:19 Glpi glpi-agent[46707]: getAvailableTasks() : add of task WakeOnLan version 2.2
Oct 13 10:21:19 Glpi glpi-agent[46707]: Preparing execution plan
Oct 13 10:21:19 Glpi glpi-agent[46707]: Available tasks:
Oct 13 10:21:19 Glpi glpi-agent[46707]: - Inventory: 1.12
Oct 13 10:21:19 Glpi glpi-agent[46707]: - NetDiscovery: 5.1
Oct 13 10:21:19 Glpi glpi-agent[46707]: - NetInventory: 5.1
Oct 13 10:21:19 Glpi glpi-agent[46707]: - RemoteInventory: 1.0
Oct 13 10:21:19 Glpi glpi-agent[46707]: - WakeOnLan: 2.2
Oct 13 10:21:19 Glpi glpi-agent[46707]: target local0: local /opt/glpi-data
Oct 13 10:21:19 Glpi glpi-agent[46707]: Planned tasks for local0: RemoteInventory
Oct 13 10:21:19 Glpi glpi-agent[46707]: running task RemoteInventory
Oct 13 10:21:19 Glpi glpi-agent[46707]: [http client] E9C4C649: Using Compress::Zlib for compression
Oct 13 10:21:19 Glpi glpi-agent[46707]: sending contact request to server0
Oct 13 10:21:19 Glpi glpi-agent[46707]: [http client] E9C4C649: sending message:#012{#012   "action": "contact",#012   "deviceid": "Glpi-2022-09-21-06-22-37",#012   "enabled-tasks": [#012      "remoteinventory"#012   ],#012   "installed-tasks": [#012      "inventory",#012      "netdiscovery",#012      "netinventory",#012      "remoteinventory",#012      "wakeonlan"#012   ],#012   "name": "GLPI-Agent",#012   "version": "1.4-1"#012}
Oct 13 10:21:20 Glpi glpi-agent[46707]: format: Zlib
Oct 13 10:21:20 Glpi glpi-agent[46707]: [http client] E9C4C649: received message:#012{"message":"remoteinventory task not supported","disabled":["remoteinventory"],"expiration":"1","status":"ok"}
Oct 13 10:21:20 Glpi glpi-agent[46707]: server message: remoteinventory task not supported
Oct 13 10:21:20 Glpi glpi-agent[46707]: [http client] Using Compress::Zlib for compression
Oct 13 10:21:20 Glpi glpi-agent[46707]: sending prolog request to server0
Oct 13 10:21:20 Glpi glpi-agent[46707]: [http client] sending message:#012<?xml version="1.0" encoding="UTF-8" ?>#012<REQUEST>#012  <DEVICEID>Glpi-2022-09-21-06-22-37</DEVICEID>#012  <QUERY>PROLOG</QUERY>#012  <TOKEN>12345678</TOKEN>#012</REQUEST>
Oct 13 10:21:20 Glpi glpi-agent[46707]: format: Zlib
Oct 13 10:21:20 Glpi glpi-agent[46707]: [http client] receiving message:#012<?xml version="1.0"?>#012<REPLY><PROLOG_FREQ>24</PROLOG_FREQ><RESPONSE>SEND</RESPONSE></REPLY>
Oct 13 10:21:20 Glpi glpi-agent[46707]: Remote inventory task execution disabled: no remote to inventory

Offline

#2 2022-10-13 15:36:47

gbougard
Moderator
From: Montpellier, France
Registered: 2021-07-21
Posts: 537
Website

Re: Unable to do remoteinventory

Hi vogell,

it is disabled on server-side as this is not actually directly supported by glpi. So don't take care of the related messages, the agent will simply run the remoteinventory if it decides it's time to.

When running on the commandline, you still can force the inventory to start with the "--force" option.

Here as you have the message "Remote inventory task execution disabled: no remote to inventory", this just means something is not right in the relationship between your "remotes" and your "targets". I see you have a "local0" target and a "server0" one. Maybe you have mixed up something.
Anyway are you running the remote inventory manually or expect the service does it at expiration ?


GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer

Offline

#3 2022-10-13 20:06:09

vogll
Member
Registered: 2022-09-22
Posts: 5

Re: Unable to do remoteinventory

gbougard wrote:

I see you have a "local0" target and a "server0" one. Maybe you have mixed up something.
Anyway are you running the remote inventory manually or expect the service does it at expiration ?

Thank you for the explanation. I changed target to the local0 and inventory file had been created.
Then I ran glpi-injection from command line.
I understand that there is no way to manage remote inventory from the WWW interface of the Glpi server.

Offline

#4 2022-10-14 19:02:33

gbougard
Moderator
From: Montpellier, France
Registered: 2021-07-21
Posts: 537
Website

Re: Unable to do remoteinventory

There will be an interface in GLPI in the future. But this is not scheduled for now.
There will be also an interface with GLPI Agent, via the ToolBox plugin, probably for next month. There's actually a prototype in nightly build but it just mimics glpi-remote command. I'll try to enhanced it for glpi-agent v1.5 release next month.


GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer

Offline

Board footer

Powered by FluxBB