Skip to content

Script error to import device information via SNMP #380

@cmoreno1981

Description

@cmoreno1981

Hello

I'm trying to activate the feature of importing SNMP equipment through the OCS plugin, according to this I see that the
inc/ocsdbclient.class.php performs the connection and import of the inventory by snmp, but according to the errors it makes a query that in the version of OCS reports 2.12.3 no longer has the snmp table, now through MIBS they are being built and when generating a feature a table is generated for example ocsweb.snmp_fortigate and so based on each asset and type a new table is generated so that file that generates and extracts information is no longer possible.

OCS Server Version 2.12.3
GLPI Version 10.0.18
ocsinventoryng plugin Version 2.0.4

This is warnings of script ocsng_snmpfullsync.php

synchronize SNMP objects from server: 'OCSINVENTORY-DVA'
SQL Error "1064": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/ FROM snmp, snmp_accountinfo
FROM snmp_accountinfo
' at line 2 in query "SELECT DISTINCT snmp.ID // FROM snmp, snmp_accountinfo FROM snmp_accountinfo WHERE snmp.SNMPDEVICEID NOT LIKE '_%' AND snmp.ID = snmp_accountinfo.SNMP_ID "
PHP Warning: Attempt to read property "num_rows" on bool in /var/www/html/glpi/src/DBmysql.php on line 533
PHP Warning: Undefined array key "SNMP" in /var/www/html/glpi/marketplace/ocsinventoryng/scripts/ocsng_snmpfullsync.php on line 249
PHP Warning: foreach() argument must be of type array|object, null given in /var/www/html/glpi/marketplace/ocsinventoryng/scripts/ocsng_snmpfullsync.php on line 249
Thread #-1: 0 object(s)
Thread #-1: done!!

Image

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions