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-24 15:51:09

Obrian
Member
Registered: 2018-10-31
Posts: 9

Understand why my rules for asset entity assignment is not working

Hi All,

I would like to have your advice, because I 'm using GLPI since a long time now for my Helpdesk and inventory.
I've realised that in the last updates (don't remember exactly when or which one) , my rules to assign a PC asset to an entity has stopped working.

Here is what is setup up, and what I've done.
1 / settings :
- first of all I use a glpi in version 10.0.7 (but was used since long time, and upgrade many times, I use it for almost 10 years now ... )
- I have entities as tree look like this  :
     Root > France > Company1
     Root > France > Company2
     Root > Germany > Company3
    ....

- I have some "Rules for assigning an item to an entity"
   criteria : "inventory tag is" = company1
   action : Entity >> Assign  : Root > France > Company1

   criteria : "inventory tag is" = company2
   action : Entity >> Assign  : Root > France > Company2
   ....


2 / Check
I've run the TEST RULES engine, and simulate the Tag one from the agent, that result is fine, the correct entity will be used.


3 / real inventory
I'm using a fresh windows test machine, with GLPI agent 1.4
if I force the inventory with --tag="company1" => PC still stays on root entity (even if the tag inside the inventory is correct : company1).

If I delete the machine from GLPI and force the inventory to with tag=company2 => machine is back in GLPI, but still in root.


4 / the different tests done
So to be sure, I've created a fresh new server , and install GLPI 10.0.7 on it.
to make it simple, I created 2 entities (France and Germany) + 2 rules to assign the computer to these entities by TAG value.

I use the same test machine, change the server setting in the agent, and then is works ..
I can change the TAG of this test machine, delete the inventoried asset in that new GLPI, and the machine will appear to the according entity.


So I must admit that after spending some hours, I'm a bit lost. It will not be a solution to start with a fresh glpi, as we do use that one since about 10 years. But I did not find what setting make this rules not working !
I even tried to use a rules with the Reg expression instead of assigning an Entity (as describes in that post ) , that works in the new glpi, but not in my real one.

Wondering what I'm doing wrong ?
Thank for your help.

Offline

#2 2023-05-31 14:57:05

Obrian
Member
Registered: 2018-10-31
Posts: 9

Re: Understand why my rules for asset entity assignment is not working

Hi again,

I'm wondering if there is a log somewhere I can check, to maybe find some import errors, or rules errors ?

Offline

#3 2023-06-12 11:20:55

Obrian
Member
Registered: 2018-10-31
Posts: 9

Re: Understand why my rules for asset entity assignment is not working

Ok, some updates. So after plying a lot with all rules and settings, I've finally succeed to have the "Rules for assigning an item to an entity" working.
The only point is that now, even if the asset is already created, when I move it to any sub entity, it will alway be replaced on the entity selected by my rule. Before, when computer was already inserted, I was able to move it wherever I want, it stayed in the entity I manually set.
I guess I will need to investigate bit more to found why now I don't have such behaviour.

Offline

#4 2023-06-12 21:05:11

AlexTR
Member
Registered: 2023-04-20
Posts: 12

Re: Understand why my rules for asset entity assignment is not working

Check in the Windows regedit your tag.

Offline

#5 2023-10-13 10:00:52

anis002
Member
Registered: 2023-09-06
Posts: 8

Re: Understand why my rules for asset entity assignment is not working

Obrian wrote:

Ok, some updates. So after plying a lot with all rules and settings, I've finally succeed to have the "Rules for assigning an item to an entity" working.
The only point is that now, even if the asset is already created, when I move it to any sub entity, it will alway be replaced on the entity selected by my rule. Before, when computer was already inserted, I was able to move it wherever I want, it stayed in the entity I manually set.
I guess I will need to investigate bit more to found why now I don't have such behaviour.

Could you tell me how you managed to solve your issue, beacause I'm having the same problem ?

Offline

Board footer

Powered by FluxBB