You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-05-16 10:14:59

falco2001
Member
Registered: 2016-02-11
Posts: 257

[résolu] [10.0.7] glpiinventory correspondance sql avec fusion

Bonjour,
depuis le passage à glpiinventory tous les scripts perso ne fonctionnent plus.
Par exemple :

SELECT DISTINCT UPPER (B.name),A.remote_addr,D.name FROM glpi_plugin_fusioninventory_inventorycomputercomputers as A LEFT JOIN glpi_computers as B ON A.computers_id = B.id LEFT JOIN glpi_items_operatingsystems as C ON C.items_id = B.id LEFT JOIN glpi_operatingsystems as D on D.id = C.operatingsystems_id LEFT JOIN glpi_plugin_fusioninventory_agents as E on E.computers_id = A.computers_id WHERE TIME_TO_SEC(TIMEDIFF(NOW(),E.last_contact)) < 1200 AND (remote_addr LIKE ...

y-a--il l’équivalant en glpiinventory ?
Où trouver la remote adresse et le dernier contact?

Merci

Last edited by falco2001 (2023-05-16 16:03:29)

Offline

#2 2023-05-16 15:52:21

NJ_KL
Member
Registered: 2023-05-10
Posts: 2

Re: [résolu] [10.0.7] glpiinventory correspondance sql avec fusion

Bonjour,

si tu regardes dans les tables glpi_agents, glpi_computers et glpi_ipnetworks, tu devrais retrouver les infos.

Offline

#3 2023-05-16 16:03:14

falco2001
Member
Registered: 2016-02-11
Posts: 257

Re: [résolu] [10.0.7] glpiinventory correspondance sql avec fusion

Merci .
réponse sur https://github.com/glpi-project/glpi-in … issues/359
La solution :

SELECT DISTINCT  UPPER(B.name), A.remote_addr, D.name FROM glpi_agents AS A LEFT JOIN glpi_computers AS B ON A.items_id = B.id  LEFT JOIN  glpi_items_operatingsystems AS C ON C.items_id = B.id LEFT JOIN  glpi_operatingsystems AS D ON D.id = C.operatingsystems_id WHERE  TIME_TO_SEC(TIMEDIFF(NOW(), A.last_contact)) < 1200 AND (remote_addr LIKE 

Offline

Board footer

Powered by FluxBB