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-09-28 14:14:16

bananshar
Member
Registered: 2022-08-04
Posts: 11

GLPI doesn't create computers from Agent report

Hello, I have an issue where some computers aren't being inserted as items into GLPI database from GLPI Agent raport.
Connectivity seems fine - as agents seem to contact the server, but report seems to have been discarded. This happens to about 40 computers from 130 that report agent present in GLPI. I also configured agent to create report in json format and save it on local disk, then the report is copied to shared network drive using independent script - right now I can see the problematic computers among these files.
All computers reporting the data have unique names, so if there's import rule preventing duplicate computer names - that's not the case.

I'm not sure where to look for debug information what causes the report to be dropped. Can I get some pointers what to look for?

GLPI version: 10.0.2 (TARBALL)
GLPI Inventory plugin (Marketplace) Version: 1.0.4
GLPI Agent version: Git nightly 1.5cabd42b9 & 1.5e074b77e
GLPI Agent installation config:

add_firewall_exception 0
Execmode 1
Json 1
Local C:\ProgramData\GLPI-Agent\
no_httpd 0
no_p2p 1
scan_profiles 1
server <redacted for privacy>
timeout 600

View from Home/Administration/Inventory/Agents (with identifiable information redacted)
GLPI-Agents-present-no-associated-items.png
Agent that never added computer to the database:
Screenshot-2022-09-28-at-13-19-08-GLPI.png
Agent working correctly:
Screenshot-2022-09-28-at-13-20-08-GLPI.png

Offline

#2 2022-09-28 17:44:54

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

Re: GLPI doesn't create computers from Agent report

Hi bananshar,

maybe the not imported inventories trigger an error during import. There's few cases that was fixed in 10.0.3 GLPI version, so you should still probably upgrade your GLPI.

In such case anyway, you should have an error in glpi-agent log and eventually in GLPI php-errors.log file (into files/_logs glpi sub-folder).


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

Offline

#3 2022-09-30 12:08:27

bananshar
Member
Registered: 2022-08-04
Posts: 11

Re: GLPI doesn't create computers from Agent report

I updated GLPI to 10.0.3, and added new computer after that.
Inventory plugin agents:

computer0057-2022-09-30-01-55-52 	Root Entity 	2022-09-30 11:51 	GLPI-Agent_v1.5-gitcabd42b9 			computer0057-2022-09-30-01-55-52 	0

glpi/files/_logs/php-errors.php is silent

However, agent log on problematic computer gives very familiar error

[Fri Sep 30 11:51:09 2022][info] running task Inventory
[Fri Sep 30 11:51:09 2022][info] New inventory from computer0057-2022-09-30-01-55-52 for server0
[Fri Sep 30 11:51:09 2022][error] Can't open HKEY_LOCAL_MACHINE/SOFTWARE/Open Source key: The handle is invalid
[Fri Sep 30 11:51:35 2022][error] [http client] communication error: 500 Internal Server Error
[Fri Sep 30 11:51:35 2022][error] [http client] server error: JSON does not validate. Violations:
"NVME" does not match to ^(SCSI|HDC|IDE|USB|1394|SATA|SAS|ATAPI)$ at #->properties:content->properties:storages->items[1]:1->properties:interface
[Fri Sep 30 11:51:36 2022][info] running task Deploy
[Fri Sep 30 11:51:36 2022][info] No Deploy job enabled or Deploy support disabled server side.
[Fri Sep 30 11:51:36 2022][info] target server0: next run: Sat Oct  1 11:10:33 2022 - http://glpi/marketplace/glpiinventory/
[Fri Sep 30 11:51:36 2022][info] GLPI Agent memory usage: WSS=3342336 PFU=160342016
[Fri Sep 30 11:52:29 2022][info] running task Deploy: storage maintenance event

I think the problem is caused by resolution of GLPI-Agent issue #198 on Github. Perhaps GLPI server doesn't have handling of new drive types implemented yet?

Offline

#4 2022-10-03 10:04:00

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

Re: GLPI doesn't create computers from Agent report

Hi bananshar,

indeed, the problem is solved by this inventory format PR. It will be included in next GLPI release to avoid such kind of error.

To not way, you can apply the PR on the inventory.schema.json file embedded with GLPI or just replace it with the current one from the official repository.


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

Offline

#5 2022-10-03 11:15:45

bananshar
Member
Registered: 2022-08-04
Posts: 11

Re: GLPI doesn't create computers from Agent report

Thanks! That solves it.
I was suspecting GLPI-Agent lib/GLPI/Agent/Inventory.pm#L113 was causing this because it had the same pattern present, but I changed the schema.json file and it works now.

Offline

#6 2023-03-02 14:43:09

lecrand
Member
Registered: 2015-11-05
Posts: 15

Re: GLPI doesn't create computers from Agent report

Hi,

I encountered the same problem : GLPI Agent synchronize computers to database but i have item 0 for some computers.
I have replaced the inventory.schema.json but no luck...
The version of our GLPI Server is the last, 10.0.6

Do you have an idea ?

Thanks a lot

Offline

#7 2023-03-02 14:50:05

bananshar
Member
Registered: 2022-08-04
Posts: 11

Re: GLPI doesn't create computers from Agent report

Running inventory manually from command line often gives useful error messages, maybe you could try that.

C:\Program Files\GLPI-Agent\glpi-inventory.bat

Offline

#8 2023-03-02 15:01:08

lecrand
Member
Registered: 2015-11-05
Posts: 15

Re: GLPI doesn't create computers from Agent report

Thank you for your feedback

I'm a newbie in GLPI, how can I extract the result of the .bat (I see you're from Montpellier, is it possible to continue our discussion in french?)

Offline

Board footer

Powered by FluxBB