pluginsGLPI / ocsinventoryng

Plugin ocsinventoryng for GLPI
GNU General Public License v2.0
68 stars 52 forks source link

Automatic import doesn't import anything #316

Open thenamelessthing opened 2 years ago

thenamelessthing commented 2 years ago

For bug reports, you can open an issue here, provide us :

After initial import of all computer I setup the automatic action to run every 5 min. In the task log I see the task run successfully. But newly added computer in OCS are not imported into GLPI.

image

image

If I do an import manually, I can see the newly added computer from OCS.

image

tsmr commented 2 years ago

The automatic task ocsng is launched only if server is not in expert mode The automatic task ocsng only synchronize existant computers, it doesn't import new computers If you want to import new computers, disable this parameter, change to expert mode and use script from system

https://github.com/pluginsGLPI/ocsinventoryng/wiki/Massive-import---Expert-Mode

thenamelessthing commented 2 years ago

In expert mode same problem. I have enabled the debug and now I see these error:

image

tsmr commented 2 years ago

Try with last https://github.com/pluginsGLPI/ocsinventoryng/archive/refs/heads/9.5/bugfixes.zip

Verify your user / password to access ocs database

thenamelessthing commented 2 years ago

Thank you, we are progressing!

image

Now I notice that this task doesn't seem to sync existing computers. I don't see the changes going up in GLPI, for example software that is no longer inventoried on a workstation is still visible in GLPI.

thenamelessthing commented 2 years ago

The --thread_nbr= option mean the number of process for the sync task or the number of computer synced for the task?

tsmr commented 2 years ago

The --thread_nbr= option mean the number of process for the sync task

thenamelessthing commented 2 years ago

@tsmr do you have any idea where I could check, to understand why the sync is not working even though I no longer have an error when running the script?

Je parle français aussi si c'est plus simple pour toi.

tsmr commented 2 years ago

Cela est censé synchroniser aussi les pcs. Mais cela dépends du checksum coté OCS. Si tu forces l'import complet, il devrait mettre à jour les logiciels normalement

thenamelessthing commented 2 years ago

Si je lance la synchro manuellement par l'interface web de GLPI tout fonctionne. Je coche tout les ordinateurs ayant du nouveau contenu et une fois lancé cela prendre quelques minutes.

Si j'utilise le script sa roule quelques secondes et il n'y a aucune erreur. C'est comme si le script ne sélectionnait pas aucun ordinateur à synchroniser...

tsmr commented 2 years ago

il compare les dates entre OCS et GLPI - donc si pas de modification, pas de synchro déclenchée if (strtotime($computer['META']["LASTDATE"]) > strtotime($data["last_update"])) {

thenamelessthing commented 2 years ago

Autre élément que je ne comprend pas, dans la documentation du mode expert. C'est indiqué qu'on pouvait suivre en temps réel l'exécution.

image

Mais je n'ai pas de lien vers ce plugin.. image

tsmr commented 2 years ago

Outils > OCS Inventory NG image

thenamelessthing commented 2 years ago

Je n'ai pas cette option et j'ai fait le tour de pas mal tout les menus de l'interface... Je ne retrouve pas cette option. Je précise que je suis connecté avec l'utilisateur glpi qui est super-admin.

msedge_2022-03-18_14-05-14

tsmr commented 2 years ago

Dans la configuration du serveur : image

thenamelessthing commented 2 years ago

Oulà! Je me sens vraiment Noob d'être passer à côté de ça! Un énorme merci pour ton aide. J'espère que ce ticket pourra être utile à d'autres.

thenamelessthing commented 2 years ago

Malgré le fait que je vois la tâche cron s'exécuter. C'est normal que je ne vois toujours rien dans cet écran?

image

Si j'ai bien compris j'ai modifier "refresh information of a process every" de la valeur 0 à 30 sec.

image

thenamelessthing commented 2 years ago

Je me répond à moi-même, il faut que la tâche cron soit fait à partir du compte root.

thenamelessthing commented 2 years ago

Dernière question, est-ce qu'il y a moyen de supprimer les ordinateurs dans OCS ou du moins les "ARCHIVER" lorsque l'on met un ordinateur avec un état spécifique (ex: état "Décommissionner")

tsmr commented 2 years ago

image

thenamelessthing commented 2 years ago

ok, j'imagine que si j'active ce paramètre. Je dois indiquer d'une quelconque façon une "règle ou une action" qui indique que lorsque l'état "décomissionner" est choisi alors exécute "utiliser l'action automatique de nettoyage des agents & suppression depuis OCSNG"..???