Page 1 of 1

WAPT 2.3 to GLPI 10.0.6

Published: May 23, 2023 - 08:42
by Nats
Hello,

I'd like to know how to export my WAPT inventory to GLPI. I've looked into how to do it, but I'm having trouble understanding. Since the graphical interface is no longer available, I'm a bit lost. So, if possible, I'd really appreciate it if you could tell me how to do it. Currently, I only have FusionInventory installed on my GLPI server.

Thanks in advance :D

. Additional information:
GLPI Server: Debian Bullseye, v10.0.6
WAPT Server: Debian Bullseye, v2.3.0.13516
WAPT Administration: Windows 10, Enterprise

Re: WAPT 2.3 to GLPI 10.0.6

Published: May 23, 2023 - 09:50
by Vincent Moisan
Hello,
I recently configured it myself and can help you.

You don't need to do anything on your GLPI 10 server. No additional plugin like FusionInventory is required.

On your WAPT administration machine, you need to install the "glpi-plugin-export-to-glpi10" package. Once installed, edit the glpi.ini and wapt_api.ini files located in "C:\Program Files (x86)\wapt\private".

In the glpi.ini file, you must enter a GLPI account with permissions and the URL of your server in the format "https://myserver.domain.com/glpi/front/inventory.php"
. In the wapt_api.ini file, you must enter a WAPT administration console account with permissions and the URL of your WAPT server.

Once the files are filled in, run an audit of the "glpi-plugin-export-to-glpi10" package and you should see the export complete.

I hope that was clear.

Regards

Re: WAPT 2.3 to GLPI 10.0.6

Published: May 23, 2023 - 11:18
by Nats
Thank you Vincent for your reply
But when installing the package, I can't find anything in the `/private` folder. I tried installing and editing the package (which is located in "C:/waptdev/wapt-glpi-plu.../"), so I have my credentials, but when I try it on a test machine I get errors, for example:
https://192.168.0.21/wapt/wapt-glpi-plu ... 3c0d6.wapt : 22341 / 22341 (100%) (1402 KB/s)
Installing wapt-glpi-plugin-export-to-glpi10(=11-13)
Error installing ['wapt-glpi-plugin-export-to-glpi10(=11-13)']: errors in packages [[PackageRequest(package='wapt-glpi-plugin-export-to-glpi10',version=(Version('11.0.0.0'), 13),architectures=['x64'],locales=['fr'],maturities=['PROD'],tags=['windows-10', 'win-10', 'w-10', 'windows10', 'win10', 'w10', 'windows', 'win', 'w'], min_os_version=Version('10.0.19044.2604'), max_os_version=Version('10.0.19044.2604')), PackageEntry('wapt-glpi-plugin-export-to-glpi10','11-13' maturity='PROD'), 'Traceback (most recent call last):\n File "C:\\Program Files (x86)\\wapt\\common.py", line 5193, in install\n result = self.install_wapt(p.localpath,\n File "C:\\Program Files (x86)\wapt\common.py", line 4167, in install_wapt\n raise e\n File "C:\\Program Files (x86)\\wapt\\common.py", line 4074, in install_wapt\n exitstatus = setup.install()\n File "C:\\Windows\\TEMP\\wapth7lewmy_\\setup.py", line 33, in install\n File "C:\\Program Files (x86)\wapt\waptutils.py", line 1887, in error\n raise EWaptSetupException(\'Fatal error: %s\' % reason)\nwaptutils.EWaptSetupException: Fatal error: This package must not contain login/password !, you have to go directly into C:\\Program Files (x86)\\wapt\\private\\glpi.ini to edit the files,\n']]
I didn't put everything in, to avoid a big pile, but I think it's enough because the error is repeated in the pile, so oh well.
But I never have anything in the "/private" folder.

Re: WAPT 2.3 to GLPI 10.0.6

Published: May 23, 2023 - 11:23
by Nats
I installed the package on one computer and it's correctly located in /private, but I don't want to have to configure each machine where I install the plugin; I'd like the configuration to be automatic...

Re: WAPT 2.3 to GLPI 10.0.6

Published: May 23, 2023 - 11:24
by sfonteneau
Good morning

The package has protection at the beginning of the code:

Code: Select all

    if not inifile_readstring("glpi_api.ini",'glpi','password') == 'glpi' :
        error('This package must not contain login/password !, you have to go directly into %s to edit the files,' % makepath(WAPT.private_dir, "glpi_api.ini"))

    if not inifile_readstring("wapt_api.ini",'wapt','password') == 'password' :
        error('This package must not contain login/password !, you have to go directly into %s to edit the files,' % makepath(WAPT.private_dir, "wapt_api.ini"))
You must not modify the package provided by Tranquilit on the store; the package must not contain the username and password (for security reasons)
In your case, removing the package from your repository, then re-importing the one from the store (without modifying it) should solve the problem.

Re: WAPT 2.3 to GLPI 10.0.6

Published: May 23, 2023 - 11:25
by sfonteneau
Nats wrote: May 23, 2023 - 11:23 AM I installed the package on a computer and it's correctly located in /private, but I don't want to have to configure each machine where I install the plugin; I'd like the configuration to be automatic...
The plugin does not need to be installed on all machines.

Only one machine has the package.

The machine connects to the wapt server, retrieves all the PCs, then sends them back to the glpi server.

Therefore, only one machine performs the vacuuming

Re: WAPT 2.3 to GLPI 10.0.6

Published: May 23, 2023 - 2:41 PM
by Vincent Moisan
Do not modify the package. It is extremely insecure to store your passwords/logins there.

The package must be installed on your administration machine, not on client machines.

To access the private folder, you need administrator privileges. So, open a PowerShell or Command Prompt window as administrator, then navigate to the private folder and list the directory; you should see the two files there. To edit them, run the command: notepad.exe .\glpi.ini (to edit it with Notepad++, for example).

Regards

Re: WAPT 2.3 to GLPI 10.0.6

Published: May 24, 2023 - 2:03 PM
by Nats
Okay, okay, thank you both, it worked well, you can close the topic.