Page 1 of 2
[RESOLVED] Package: tis-glpi-plugin-export-to-glpi10
Published: August 5, 2022 - 11:07 AM
by t.heroult
Hello everyone
I am testing the package with the latest version of WAPT (2.2.2.12388).
I have configured both INI files according to my servers, however I am unsure which account to use for the wapt_api.ini file.
I tested with several users (user created in WAPT, root account of the server - yes, it's bad, but it was just for testing).
In any case, I have a permissions problem on the WAPT server; apparently, the package audit is failing
Code: Select all
Auditing ln-glpi-plugin-export-to-glpi10
Audit aborted due to exception: 403 Client Error: FORBIDDEN for url: https://srvwapt.XXXXXXX.local//api/v3/hosts?columns=dmi,wmi,host_info,host_metrics,waptwua_status,wuauserv_status,host_audit%2Fglpi%2Fupload%2Fvalue%2Flastid,host_audit%2Fglpi%2Fupload%2Fvalue%2Fhash,host_capabilities,wapt_status&limit=10000
What needs to be corrected?
Sincerely,
Tom
Re: Package: tis-glpi-plugin-export-to-glpi10
Published: August 5, 2022 - 11:41
by t.heroult
Clarification:
If I access the address in a browser using, for example, my WAPT login, I correctly get a JSON result with the machines.
But if I put the same credentials in the wapt_api.ini file, I get an error.
Re: Package: tis-glpi-plugin-export-to-glpi10
Published: August 5, 2022 - 1:14 PM
by sfonteneau
If it works through your browser with the same credentials, it should work in the package, so it's strange.
Re: Package: tis-glpi-plugin-export-to-glpi10
Published: August 5, 2022 - 1:43 PM
by t.heroult
We agree, Simon, that's not normal.
I just tried with version 5 of the package and it's the same.
Re: Package: tis-glpi-plugin-export-to-glpi10
Published: August 5, 2022 - 2:18 PM
by t.heroult
In the nginx acces.log file, I get this:
Code: Select all
172.16.50.116 - - [05/Aug/2022:14:11:12 +0200] "GET //api/v3/hosts?columns=host_audit%2Fglpi%2Fupload%2Fvalue%2Flastid,host_audit%2Fglpi%2Fupload%2Fvalue%2Fhash&limit=10000 HTTP/1.1" 401 88 "-" "wapt/2.2.2"
172.16.50.116 - waptregister [05/Aug/2022:14:11:12 +0200] "GET //api/v3/hosts?columns=host_audit%2Fglpi%2Fupload%2Fvalue%2Flastid,host_audit%2Fglpi%2Fupload%2Fvalue%2Fhash&limit=10000 HTTP/1.1" 403 56 "-" "wapt/2.2.2"
172.16.50.116 - - [05/Aug/2022:14:11:12 +0200] "HEAD /ping HTTP/1.1" 200 0 "-" "wapt/2.2.2"
172.16.50.116 - - [05/Aug/2022:14:11:13 +0200] "POST /update_host HTTP/1.1" 200 1211 "-" "wapt/2.2.2"
Does this mean that the package uses the login "waptregister"?
If so, how is that possible given that the information in the wapt_api.ini file is different?
Re: Package: tis-glpi-plugin-export-to-glpi10
Published: August 5, 2022 - 2:25 PM
by t.heroult
Okay, I think I understand.
The problem with the package is that it only copies the INI files if they don't already exist; it doesn't update them!
I'll modify the package's install() function to fix that and we'll see...
Re: Package: tis-glpi-plugin-export-to-glpi10
Published: August 5, 2022 - 2:29 PM
by t.heroult
Now I'm not getting any more errors...
However, I have nothing in GLPI. The PC information isn't being updated.
Re: Package: tis-glpi-plugin-export-to-glpi10
Published: August 5, 2022 - 3:47 PM
by t.heroult
Okay, I've tried everything, but nothing works; no information is being transmitted to GLPI 10 (the GLPI plugin, not Fusion, obviously).
I'll wait until it's fixed. I'll continue using my custom package for the GLPI agent (flat file copying, generating a scheduled task, and also using 'External Tools' to generate inventories on the fly without impacting audit time).
I'll keep an eye out for any updates.
Regards,
Tom.
P.S.: I can help if needed.
Re: Package: tis-glpi-plugin-export-to-glpi10
Published: August 8, 2022 - 10:35
by sfonteneau
I see (from your email address) that you have support.
Can you contact us by phone?
Re: Package: tis-glpi-plugin-export-to-glpi10
Published: August 8, 2022 - 4:11 PM
by t.heroult
OK, I'll call you tomorrow
