ocsinventoryng icon indicating copy to clipboard operation
ocsinventoryng copied to clipboard

Plus d'import ou de liaison d'ordinateurs , seulement des "ordinateurs synchronisés"

Open muscat31 opened this issue 2 years ago • 2 comments

muscat31 avatar Jan 04 '23 13:01 muscat31

Bonjour,

Depuis quelques semaines, nous avons constaté que nos crons de synchro OCS GLPI ( fullsync.sh ... ) n'importaient plus aucun équipements. En effet il synchronise bien les milliers d'équipements déjà présent dans GLPI , mais tout nouveaux postes ou serveurs n'est pas importés automatiquement image

Bien entendu ces équipements sont "vus" par le plugin est importables manuellement via "Importation de nouveaux ordinateurs"

Nous sommes bien en mode expert , à priori rien n'aurait été modifié.

Une idée? un bug connu ? j'ai l'impression que contrairement à la page "ocsng.import.php " , la page ocsng_fullsync.php ( modifié par le bugfix 9.5 ) ne capte pas la présence d'équipement à importer.

D'avances merci,

Nous sommes en GLPI 9.5.7 avec le plugin ocs 1.7.3 sur lequel on a passé le bugfix 9.5 (ocsinventoryng-9.5-bugfixes.zip) côté OCS nous sommes sur un serveur en 2.9.2

muscat31 avatar Jan 04 '23 13:01 muscat31

Bonjour, Nous avons exactement le même souci avec GLPI 10.0.3 et OCS 2.11.0 L'importation manuelle fonctionne, mais pas l'importation par script en mode expert.

The SQL error log is full of those warnings:

  *** MySQL query warnings:
  SQL: SELECT DISTINCT `hardware`.`ID`,`hardware`.`LASTDATE`,`hardware`.`NAME` FROM `hardware` INNER JOIN `accountinfo` ON `accountinfo`.`HARDWARE_ID` = `hardware`.`ID` WHERE `hardware`.`DEVICEID` NOT LIKE '\_%' AND `hardware`.`ARCHIVE` IS NULL  AND (`hardware`.`LASTDATE` > '2023-01-19 16:25:08')  AND (`hardware`.`LASTDATE` < 'NOW()')  ORDER BY  LASTDATE
  Warnings:
1292: Incorrect datetime value: 'NOW()'
  Backtrace :
  ...e/ocsinventoryng/inc/ocsdbclient.class.php:1040
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:352 PluginOcsinventoryngOcsDbClient->getComputers()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:293 plugin_ocsinventoryng_importFromOcsServer()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:166 SecondPass()
  {"user":"@celeste"}
[2023-01-19 17:00:28] glpisqllog.WARNING: DBmysql::query() in /srv/glpi/src/DBmysql.php line 404
  *** MySQL query warnings:
  SQL: SELECT count(DISTINCT `hardware`.`ID`) as total FROM `hardware` INNER JOIN `accountinfo` ON `accountinfo`.`HARDWARE_ID` = `hardware`.`ID` WHERE `hardware`.`DEVICEID` NOT LIKE '\_%' AND `hardware`.`ARCHIVE` IS NULL  AND (`hardware`.`LASTDATE` > '2023-01-19 16:25:08')  AND (`hardware`.`LASTDATE` < 'NOW()')
  Warnings:
1292: Incorrect datetime value: 'NOW()'
  Backtrace :
  ...e/ocsinventoryng/inc/ocsdbclient.class.php:1043
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:352 PluginOcsinventoryngOcsDbClient->getComputers()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:293 plugin_ocsinventoryng_importFromOcsServer()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:166 SecondPass()
  {"user":"@celeste","mem_usage":"0.016\", 17.86Mio)"}
[2023-01-19 17:00:28] glpisqllog.WARNING: DBmysql::query() in /srv/glpi/src/DBmysql.php line 404
  *** MySQL query warnings:
  SQL: SELECT DISTINCT `hardware`.`ID`,`hardware`.`LASTDATE`,`hardware`.`NAME` FROM `hardware` INNER JOIN `accountinfo` ON `accountinfo`.`HARDWARE_ID` = `hardware`.`ID` WHERE `hardware`.`DEVICEID` NOT LIKE '\_%' AND `hardware`.`ARCHIVE` IS NULL  AND (('516039' & `hardware`.`CHECKSUM`) > 1) AND (`hardware`.`LASTDATE` < 'NOW()')  ORDER BY  LASTDATE
  Warnings:
1292: Incorrect datetime value: 'NOW()'
  Backtrace :
  ...e/ocsinventoryng/inc/ocsdbclient.class.php:1040
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:375 PluginOcsinventoryngOcsDbClient->getComputers()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:293 plugin_ocsinventoryng_importFromOcsServer()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:166 SecondPass()
  {"user":"@celeste","mem_usage":"0.009\", 17.85Mio)"}
[2023-01-19 17:00:28] glpisqllog.WARNING: DBmysql::query() in /srv/glpi/src/DBmysql.php line 404
  *** MySQL query warnings:
  SQL: SELECT count(DISTINCT `hardware`.`ID`) as total FROM `hardware` INNER JOIN `accountinfo` ON `accountinfo`.`HARDWARE_ID` = `hardware`.`ID` WHERE `hardware`.`DEVICEID` NOT LIKE '\_%' AND `hardware`.`ARCHIVE` IS NULL  AND (('516039' & `hardware`.`CHECKSUM`) > 1) AND (`hardware`.`LASTDATE` < 'NOW()')
  Warnings:
1292: Incorrect datetime value: 'NOW()'
  Backtrace :
  ...e/ocsinventoryng/inc/ocsdbclient.class.php:1043
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:375 PluginOcsinventoryngOcsDbClient->getComputers()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:293 plugin_ocsinventoryng_importFromOcsServer()
  ...s/ocsinventoryng/scripts/ocsng_fullsync.php:166 SecondPass()
  {"user":"@celeste","mem_usage":"0.018\", 17.86Mio)"}

Edzilla2000 avatar Jan 19 '23 16:01 Edzilla2000