glpi-project / glpi-agent

GLPI Agent
GNU General Public License v2.0
212 stars 51 forks source link

Database instance not inventoried #616

Closed lexcyr closed 3 months ago

lexcyr commented 3 months ago

Bug reporting acknowledgment

Yes, I read it

Professional support

Yes, I know

Describe the bug

The MSQL database are not imported/added after inventory even if i have the dabases listed in the json file: "databases_services": [ { "databases": [ { "creation_date": "2003-04-08 09:13:36", "is_active": true, "name": "db1", "size": 7, "update_date": "2016-04-30 00:48:23" }, { "creation_date": "2024-03-04 05:47:04", "is_active": true, "name": "db2", "size": 4360, "update_date": "2024-03-05 08:46:12" }, { "creation_date": "2003-04-08 09:13:36", "is_active": true, "name": "db3", "size": 0 }, { "creation_date": "2016-04-30 00:46:38", "is_active": true, "name": "db4", "size": 1036, "update_date": "2022-12-16 03:06:50" }, { "creation_date": "2019-11-25 13:47:43", "is_active": true, "name": "db5", "size": 0 }, { "creation_date": "2021-05-25 18:44:14", "is_active": true, "name": "db6", "size": 0 }, { "creation_date": "2021-05-25 19:55:59", "is_active": true, "name": "db7", "size": 0 }, { "creation_date": "2020-02-04 20:20:57", "is_active": true, "name": "db8", "size": 0 }, { "creation_date": "2020-02-04 20:23:10", "is_active": true, "name": "db9", "size": 0 }, { "creation_date": "2021-05-25 20:52:10", "is_active": true, "name": "db10", "size": 0 }, { "creation_date": "2021-06-15 19:21:29", "is_active": true, "name": "db11", "size": 0 }, { "creation_date": "2021-06-15 20:01:15", "is_active": true, "name": "db12", "size": 0 }, { "creation_date": "2021-09-14 19:24:11", "is_active": true, "name": "db13", "size": 0 } ], "is_active": true, "last_boot_date": "2024-03-04 05:47:02", "manufacturer": "Microsoft", "name": "MSSQLSERVER", "port": 1433, "size": 5809, "type": "mssql", "version": "13.0.6419.1" } ],

To reproduce

  1. Install GLPI agent1.5 in a windows 2019 server with MSQL server 2016.
  2. Run the inventory

Expected behavior

Have the existing databases in the database instance list of the server asset in GLPI

Operating system

Windows

GLPI Agent version

1.5

GLPI version

10.0.10

GLPIInventory plugin or other plugin version

GLPI Inventory v1.3.x (See additional context below)

Additional context

No response

g-bougard commented 3 months ago

Hi @lexcyr

the problem seems not a bug in the agent. So I'm moving it as a Q&A discussion because you probably have an issue on server side.

You still should probably upgrade your GLPI instance, but the first thing to do is maybe checking for error in the file/_log/php-errors.log at the time the inventory is submitted.

You should also check for error in the glpi-agent log file on submission.