glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
46 stars 27 forks source link

NetInventory for switches does not work in glpi inventory #400

Closed waaalex closed 1 year ago

waaalex commented 1 year ago

Describe the bug

When i launch netinventory from web ui, inventory does not work.

From this command it works :

C:\Program Files\GLPI-Agent>glpi-netinventory.bat --host 10.0.3.2 --credentials version:3,username:snmp,authprotocol:md5,authpassword:a,privprotocol:aes,privpassword:a

Log from glpi agent:

[Tue Sep  5 11:17:55 2023][info] running task NetInventory
[Tue Sep  5 11:18:13 2023][error] [thread 409] #06, [thread 409] SNMP communication error: no response from host 10.0.3.5
[Tue Sep  5 11:18:13 2023][error] [thread 408] #04, [thread 408] SNMP communication error: no response from host 10.0.3.13
[Tue Sep  5 11:18:13 2023][error] [thread 406] #08, [thread 406] SNMP communication error: no response from host 10.0.3.4
[Tue Sep  5 11:18:13 2023][error] [thread 401] #07, [thread 401] SNMP communication error: no response from host 10.0.3.3
[Tue Sep  5 11:18:13 2023][error] [thread 407] #03, [thread 407] SNMP communication error: no response from host 10.0.3.12
[Tue Sep  5 11:18:13 2023][error] [thread 405] #01, [thread 405] SNMP communication error: no response from host 10.0.3.14
[Tue Sep  5 11:18:13 2023][error] [thread 403] #02, [thread 403] SNMP communication error: no response from host 10.0.3.2
[Tue Sep  5 11:18:13 2023][error] [thread 410] #10, [thread 410] SNMP communication error: no response from host 10.0.3.7
[Tue Sep  5 11:18:13 2023][error] [thread 404] #05, [thread 404] SNMP communication error: no response from host 10.0.3.6
[Tue Sep  5 11:18:13 2023][error] [thread 402] #09, [thread 402] SNMP communication error: no response from host 10.0.3.8
[Tue Sep  5 11:18:13 2023][error] [thread 407] #03, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:13 2023][error] [thread 408] #04, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:13 2023][error] [thread 409] #06, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:13 2023][error] [thread 406] #08, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:13 2023][error] [thread 405] #01, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:13 2023][error] [thread 404] #05, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:13 2023][error] [thread 402] #09, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:13 2023][error] [thread 410] #10, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:13 2023][error] [thread 401] #07, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:13 2023][error] [thread 403] #02, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:28 2023][error] [thread 407] #11, [thread 407] SNMP communication error: no response from host 10.0.3.11
[Tue Sep  5 11:18:28 2023][error] [thread 408] #12, [thread 408] SNMP communication error: no response from host 10.0.3.1
[Tue Sep  5 11:18:28 2023][error] [thread 409] #13, [thread 409] SNMP communication error: no response from host 10.0.3.23
[Tue Sep  5 11:18:28 2023][error] [thread 407] #11, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:28 2023][error] [thread 408] #12, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Tue Sep  5 11:18:28 2023][error] [thread 409] #13, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion

In php error log :

[2023-09-06 17:16:41] glpiphplog.WARNING:   *** PHP User Warning (512): Invalid relations declared for "glpi_plugin_accounts_accountstates" table. Target table "glpi_plugin_accounts_mailingstates" does not correspond to a known itemtype. in /var/www/html/glpi/src/DbUtils.php at line 2111
  Backtrace :
  src/DbUtils.php:2111                               trigger_error()
  inc/db.function.php:585                            DbUtils->getDbRelations()
  src/CommonDBTM.php:866                             getDbRelations()
  src/CommonDBTM.php:788                             CommonDBTM->cleanRelationData()
  src/CommonDBTM.php:2068                            CommonDBTM->deleteFromDB()
  src/RuleMatchedLog.php:183                         CommonDBTM->delete()
  src/Inventory/Asset/MainAsset.php:861              RuleMatchedLog->cleanOlddata()
  src/RuleImportAsset.php:969                        Glpi\Inventory\Asset\MainAsset->rulepassed()
  src/Rule.php:1525                                  RuleImportAsset->executeActions()
  src/RuleCollection.php:1640                        Rule->process()
  src/Inventory/Asset/MainAsset.php:573              RuleCollection->processAllRules()
  src/Inventory/Inventory.php:709                    Glpi\Inventory\Asset\MainAsset->handle()
  src/Inventory/Inventory.php:340                    Glpi\Inventory\Inventory->handleItem()
  src/Inventory/Request.php:360                      Glpi\Inventory\Inventory->doInventory()
  src/Inventory/Request.php:90                       Glpi\Inventory\Request->inventory()
  src/Agent/Communication/AbstractRequest.php:359    Glpi\Inventory\Request->handleAction()
  src/Agent/Communication/AbstractRequest.php:271    Glpi\Agent\Communication\AbstractRequest->handleJSONRequest()
  front/inventory.php:92                             Glpi\Agent\Communication\AbstractRequest->handleRequest()
  plugins/glpiinventory/front/communication.php:72   include_once()
  plugins/glpiinventory/index.php:45                 include_once()

To reproduce

  1. Select task
  2. Force task to execute
  3. On the agent, force inventory

Expected behavior

Should work without error messages.

Operating system

Linux

GLPI Agent version

1.5

GLPI version

10.0.9

GLPIInventory plugin

1.2.3

Additional context

same as : https://github.com/glpi-project/glpi/issues/15534 this does not helped me : https://github.com/glpi-project/glpi/issues/14943

stonebuzz commented 1 year ago

Hi @waaalex

about

[2023-09-06 17:16:41] glpiphplog.WARNING: *** PHP User Warning (512): Invalid relations declared for "glpi_plugin_accounts_accountstates" table. Target table "glpi_plugin_accounts_mailingstates" does not correspond to a known itemtype. in /var/www/html/glpi/src/DbUtils.php at line 2111

Can you open an issue here -> https://github.com/InfotelGLPI/accounts/issues

about

Key error is not handled in network devices conversion

An issue is already open here

https://github.com/glpi-project/glpi/issues/14943

is the agent configured to send inventory to GLPI or to the GLPIInventory plugin?

(server arg from agent.cfg)

trasher commented 1 year ago

As said in GLPI ticket, this is a plugin issue, so we'll keep this one open. As far as I see in logs, this attempt has been made against glpiinventory plugin (please confirm @waaalex )

waaalex commented 1 year ago

@trasher yes I confirm. Thanks.

Hi @waaalex

about

[2023-09-06 17:16:41] glpiphplog.WARNING: *** PHP User Warning (512): Invalid relations declared for "glpi_plugin_accounts_accountstates" table. Target table "glpi_plugin_accounts_mailingstates" does not correspond to a known itemtype. in /var/www/html/glpi/src/DbUtils.php at line 2111

Can you open an issue here -> https://github.com/InfotelGLPI/accounts/issues

Ok I will make another issue

g-bougard commented 1 year ago

As said in GLPI ticket, this is a plugin issue, so we'll keep this one open. As far as I see in logs, this attempt has been made against glpiinventory plugin (please confirm @waaalex )

The clue is, even on errors, the agent submits a XML that looks like an inventory (sorry for that, this is historic): as the test l.48 in front/communication.php is still false in that case, the plugin will default to pass the request to native inventory on l.72 same file. If we decide to handle the problem on the plugin, this means we will most of the time (when not an error) decode the XML 2 times: one time in the plugin to check if we have an error, and when not an error, one more time in native inventory. Do we really want to use that not optimized path ?

trasher commented 1 year ago

As far as I remember, plugin should have handled those errors. But debugging all this stuff is a nightmare, I've not been able to have something working (as usual...).

Native inventory does not handle newtork inventories/discoveries communication. Until this changes, all related stuff must be handled plugin side.

stonebuzz commented 1 year ago

@waaalex

can you try this :

  1. update inventory_format to allow <ERROR> node from netinventory

you need to update this file

GLPI/vendor/glpi-project/inventory_format/inventory.schema.json

according to this -> https://github.com/glpi-project/inventory_format/pull/121

  1. update glpiinventory plugin according to this -> https://github.com/glpi-project/glpi-inventory-plugin/pull/402/files1

  2. reset OPCache if needed (php bin/console cache:clear)

Then retry =)

Best regards

waaalex commented 1 year ago

I have updated inventory.schema.json according to point 1. But i don't understand what to do for point 2. Link is the same as point 1 and there is no update for glpiinventory plugin.

EDIT : Do i have to update inc/communicationnetworkinventory.class.php according to this > https://github.com/glpi-project/glpi-inventory-plugin/pull/402/files ?

Regards.

stonebuzz commented 1 year ago

Yes (sorry)

I've updated my comment

and added command to reset OPCache

waaalex commented 1 year ago

Done. I also restarted apache but same error on agent log.

[Fri Sep  8 09:50:46 2023][info] running task NetInventory
[Fri Sep  8 09:51:03 2023][error] [thread 62] #04, [thread 62] SNMP communication error: no response from host 10.0.3.13
[Fri Sep  8 09:51:03 2023][error] [thread 61] #09, [thread 61] SNMP communication error: no response from host 10.0.3.8
[Fri Sep  8 09:51:03 2023][error] [thread 57] #01, [thread 57] SNMP communication error: no response from host 10.0.3.14
[Fri Sep  8 09:51:03 2023][error] [thread 64] #05, [thread 64] SNMP communication error: no response from host 10.0.3.6
[Fri Sep  8 09:51:03 2023][error] [thread 60] #03, [thread 60] SNMP communication error: no response from host 10.0.3.12
[Fri Sep  8 09:51:03 2023][error] [thread 56] #10, [thread 56] SNMP communication error: no response from host 10.0.3.7
[Fri Sep  8 09:51:03 2023][error] [thread 62] #04, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:03 2023][error] [thread 65] #06, [thread 65] SNMP communication error: no response from host 10.0.3.5
[Fri Sep  8 09:51:03 2023][error] [thread 63] #07, [thread 63] SNMP communication error: no response from host 10.0.3.3
[Fri Sep  8 09:51:04 2023][error] [thread 58] #08, [thread 58] SNMP communication error: no response from host 10.0.3.4
[Fri Sep  8 09:51:04 2023][error] [thread 61] #09, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:04 2023][error] [thread 57] #01, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:04 2023][error] [thread 64] #05, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:04 2023][error] [thread 58] #08, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:04 2023][error] [thread 60] #03, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:04 2023][error] [thread 56] #10, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:04 2023][error] [thread 65] #06, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:04 2023][error] [thread 63] #07, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:16 2023][error] [thread 59] #11, [thread 59] SNMP communication error: no response from host 10.0.3.11
[Fri Sep  8 09:51:16 2023][error] [thread 59] #11, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:18 2023][error] [thread 62] #12, [thread 62] SNMP communication error: no response from host 10.0.3.1
[Fri Sep  8 09:51:19 2023][error] [thread 61] #13, [thread 61] SNMP communication error: no response from host 10.0.3.23
[Fri Sep  8 09:51:19 2023][error] [thread 62] #12, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:19 2023][error] [thread 61] #13, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 09:51:21 2023][info] running task Deploy
[Fri Sep  8 09:51:21 2023][info] No Deploy job enabled or Deploy support disabled server side.
stonebuzz commented 1 year ago

is the agent configured to send inventory to GLPI or to the GLPIInventory plugin?

(server arg from agent.cfg)

stonebuzz commented 1 year ago

It seems that the changes made by

https://github.com/glpi-project/inventory_format/pull/121

Are not applied correctly

waaalex commented 1 year ago

to the to the GLPIInventory plugin https://glpi/glpi/plugins/glpiinventory/

stonebuzz commented 1 year ago

Ho sorry I forgot a commit

stonebuzz commented 1 year ago

Can you apply this commit

https://github.com/glpi-project/inventory_format/pull/121/commits/4a7dd123e4cbab8a2357b396c190f98fb45e30da

waaalex commented 1 year ago

same issue. I cleared chace and restart httpd.

[Fri Sep  8 10:03:44 2023][info] running task NetInventory
[Fri Sep  8 10:04:02 2023][error] [thread 75] #03, [thread 75] SNMP communication error: no response from host 10.0.3.12
[Fri Sep  8 10:04:02 2023][error] [thread 81] #05, [thread 81] SNMP communication error: no response from host 10.0.3.6
[Fri Sep  8 10:04:02 2023][error] [thread 78] #04, [thread 78] SNMP communication error: no response from host 10.0.3.13
[Fri Sep  8 10:04:02 2023][error] [thread 77] #10, [thread 77] SNMP communication error: no response from host 10.0.3.7
[Fri Sep  8 10:04:02 2023][error] [thread 72] #01, [thread 72] SNMP communication error: no response from host 10.0.3.14
[Fri Sep  8 10:04:02 2023][error] [thread 75] #03, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:02 2023][error] [thread 73] #06, [thread 73] SNMP communication error: no response from host 10.0.3.5
[Fri Sep  8 10:04:02 2023][error] [thread 76] #09, [thread 76] SNMP communication error: no response from host 10.0.3.8
[Fri Sep  8 10:04:02 2023][error] [thread 80] #08, [thread 80] SNMP communication error: no response from host 10.0.3.4
[Fri Sep  8 10:04:02 2023][error] [thread 81] #05, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:02 2023][error] [thread 79] #07, [thread 79] SNMP communication error: no response from host 10.0.3.3
[Fri Sep  8 10:04:02 2023][error] [thread 78] #04, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:02 2023][error] [thread 77] #10, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:02 2023][error] [thread 72] #01, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:02 2023][error] [thread 73] #06, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:02 2023][error] [thread 76] #09, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:02 2023][error] [thread 80] #08, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:02 2023][error] [thread 79] #07, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:11 2023][error] [thread 74] #11, [thread 74] SNMP communication error: no response from host 10.0.3.11
[Fri Sep  8 10:04:11 2023][error] [thread 74] #11, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:17 2023][error] [thread 75] #12, [thread 75] SNMP communication error: no response from host 10.0.3.1
[Fri Sep  8 10:04:17 2023][error] [thread 81] #13, [thread 81] SNMP communication error: no response from host 10.0.3.23
[Fri Sep  8 10:04:17 2023][error] [thread 75] #12, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:17 2023][error] [thread 81] #13, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep  8 10:04:22 2023][info] running task Deploy
[Fri Sep  8 10:04:22 2023][info] No Deploy job enabled or Deploy support disabled server side.
[Fri Sep  8 10:04:24 2023][info] target server0: next run: Sat Sep  9 09:23:24 2023 - https://glpi/glpi/plugins/glpiinventory/
stonebuzz commented 1 year ago

I'm really running out of coffee !!

Can you revert last change and apply this

https://github.com/glpi-project/inventory_format/pull/121/commits/fd8bb5b371c1cc9d2e034efe35702a6bbbb22686

waaalex commented 1 year ago

Not the same error but it does not work.

[Fri Sep  8 10:17:39 2023][info] running task NetInventory
[Fri Sep  8 10:17:57 2023][error] [thread 88] #03, [thread 88] SNMP communication error: no response from host 10.0.3.12
[Fri Sep  8 10:17:57 2023][error] [thread 89] #01, [thread 89] SNMP communication error: no response from host 10.0.3.14
[Fri Sep  8 10:17:57 2023][error] [thread 94] #07, [thread 94] SNMP communication error: no response from host 10.0.3.3
[Fri Sep  8 10:17:57 2023][error] [thread 91] #10, [thread 91] SNMP communication error: no response from host 10.0.3.7
[Fri Sep  8 10:17:57 2023][error] [thread 92] #06, [thread 92] SNMP communication error: no response from host 10.0.3.5
[Fri Sep  8 10:17:57 2023][error] [thread 93] #04, [thread 93] SNMP communication error: no response from host 10.0.3.13
[Fri Sep  8 10:17:57 2023][error] [thread 96] #05, [thread 96] SNMP communication error: no response from host 10.0.3.6
[Fri Sep  8 10:17:57 2023][error] [thread 95] #09, [thread 95] SNMP communication error: no response from host 10.0.3.8
[Fri Sep  8 10:17:57 2023][error] [thread 89] #01, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:17:57 2023][error] [thread 88] #03, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:17:57 2023][error] [thread 97] #08, [thread 97] SNMP communication error: no response from host 10.0.3.4
[Fri Sep  8 10:17:57 2023][error] [thread 94] #07, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:17:57 2023][error] [thread 93] #04, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:17:57 2023][error] [thread 91] #10, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:17:57 2023][error] [thread 96] #05, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:17:57 2023][error] [thread 95] #09, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:17:57 2023][error] [thread 92] #06, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:17:57 2023][error] [thread 97] #08, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:18:07 2023][error] [thread 90] #11, [thread 90] SNMP communication error: no response from host 10.0.3.11
[Fri Sep  8 10:18:07 2023][error] [thread 90] #11, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:18:12 2023][error] [thread 88] #13, [thread 88] SNMP communication error: no response from host 10.0.3.23
[Fri Sep  8 10:18:12 2023][error] [thread 89] #12, [thread 89] SNMP communication error: no response from host 10.0.3.1
[Fri Sep  8 10:18:12 2023][error] [thread 88] #13, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:18:12 2023][error] [thread 89] #12, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep  8 10:18:17 2023][info] running task Deploy
[Fri Sep  8 10:18:17 2023][info] No Deploy job enabled or Deploy support disabled server side.
[Fri Sep  8 10:18:19 2023][info] target server0: next run: Sat Sep  9 09:57:30 2023 - https://glpi/glpi/plugins/glpiinventory/
[Fri Sep  8 10:18:19 2023][info] GLPI Agent memory usage: WSS=3395584 PFU=262148096
stonebuzz commented 1 year ago

OK, the XML is correctly converted and sent to the plugin

But the plugin can't handle the error

I look at

stonebuzz commented 1 year ago

Ok

can you revert changes from glpiinventory plugin and apply this

https://github.com/glpi-project/glpi-inventory-plugin/pull/402/files

waaalex commented 1 year ago

I go to a meeting. I'm taking the test this afternoon. thanks.

waaalex commented 1 year ago

Ok, one of switches have made a report. For others :

[Fri Sep  8 14:10:06 2023][info] running task NetInventory
[Fri Sep  8 14:10:24 2023][error] [thread 127] #06, [thread 127] SNMP communication error: no response from host 10.0.3.5
[Fri Sep  8 14:10:24 2023][error] [thread 123] #10, [thread 123] SNMP communication error: no response from host 10.0.3.7
.................
[Fri Sep  8 14:10:44 2023][info] running task Deploy

For working, i have to disable "snmpv3 only" option and put "public" community in snmpV2 on my switches. Even if in IP scope i only have SNMP3, glpiinventory needs snmpv2.

It was working with fusioninventory agent and plugin. Have you got an idea about that?

stonebuzz commented 1 year ago

For me it's another problm, please open new issue to close this one