Skip to main content

Manually inject an inventory

It is possible to manually inject an inventory file.

You must retrieve the injection URL from the inventory substitute configuration. This configuration is located in the file /etc/pulse-xmpp-agent-substitute/agent_master_substitute_inv.ini.local

[glpi]
url_to_forward = http://server/glpi/plugins/glpiinventory/front/plugin_fusioninventory.communication.php

To inject the /root/inventaire.xml file, use the following command:

curl -X POST --data @/root/inventaire.xml -H "Content-Type: text/xml" -H "Pragma: no-cache" -H "User-Agent: siveo-injector" "http://server/glpi/plugins/glpiinventory/front/plugin_fusioninventory.communication.php" -v

The result of this command is:

Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.1.1:80...
* Connected to server (127.0.1.1) port 80 (#0)
> POST /glpi/plugins/glpiinventory/front/plugin_fusioninventory.communication.php HTTP/1.1
> Host: server
> Accept: */*
> Content-Type: text/xml
> Pragma: no-cache
> User-Agent: siveo-injector
> Content-Length: 158882
> 
* We are completely uploaded and fine
< HTTP/1.1 200 OK
< Date: Tue, 22 Sep 2026 10:33:17 GMT
< Server: Apache/2.4.68 (Debian)
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Accept: */*
< Cache-Control: no-cache,no-store
< Connection: close
< Pragma: no-cache
< Set-Cookie: glpi_ce733d4c447bd364f7347dd340193517=bghti4qjaq1h3ggss5v95shv47; path=/; HttpOnly
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Content-Type: application/xml
< 
<?xml version="1.0"?>
* Closing connection 0
<REPLY><RESPONSE>SEND</RESPONSE></REPLY>

The response status is 200, which means the injection was successful.