glpi-inventory-plugin
glpi-inventory-plugin copied to clipboard
Netdiscovery strange behaviour
Describe the bug
hi, We are trying to migrate from GLPI 10.0.6 with FI plugin to GLPI 10.0.11 with glpi inventory plugin 1.3.4, we are trying to use same import and link rules, however are getting different final inventory results (we have put in place simple test setup)
-
We have installed GLPI Agent 1.71 and inventoried 2 computers, host1 - 192.168.1.40/28 and host2 - 192.168.1.23/28
-
We have defined the Network discovery task/job for IP range 192.168.1.16/28, in which as target we put IP range 192.168.1.16/28 and as actor host 1
-
We have also put in place a very simple set of import and link rules like below:
-
We are running the agent on host 1 in order to perform the Network discovery task as result our inventory is becoming
To reproduce
- Implement the infrastructure similar to above
- Implement same simple set of GPLI import and link rules
- run the GLPI agent to perform network discovery
Expected behavior
As per screenshot we have defined only 4 import rules:
- Update by UUID - rule which will update the existing computers if they are already present in inventory and have same UUID
- Import by UUID - rule which will import computer if no computer with matching UUID found in inventory
- Import by IP denied - rule which is supposed to deny import if IP to be imported is already present in inventory 4.Import by IP - rule which will perform the import by IP
However as we can see it seems that rule "Import by IP denied" is not having any effect even if same IP (192.168.1.23) is already present in inventory and belonging to host2 the rule is not denying the import, action passing to next rule "Import by IP" which is updating the host2 leading to non-desirable effects.
To mention here that GLPI 10.0.6 and FI plugin are working properly in this scenario no import is performed
Operating system
Linux
GLPI Agent version
Other (See additional context below)
GLPI version
10.0.11
GLPIInventory plugin
1.3.4
Additional context
No response
hi, Could you advise please if you have any ideas regarding described?
Thanks
Hello, Anybody please? Or maybe not in the plugin scope but rather GLPI issue?
Thanks
hi @acdmail
why not use GLPI's default reconciliation rules? (works very well in 98% of cases)
I confess I don't understand what you're trying to do
@stonebuzz thanks for you response and suggestion, I will try the default rules once again however unfortunately until now I was always in that 98% of cases :)
For the submitted issue, I just do not understand why the rules are not working as before anymore and exactly why even if I have the below rule and the IP is already present in GLPI database the effect is not as expected and exactly asset is updated instead of Import denied (so rule just bypassed without matching)
I've created the same kind of rule
my PC has not been updated
But I have this rule in first position
Maybe yours isn't triggered because another upstream rule matches the criteria.
It doesn't really matter,
from what I can see/understand, discovery supports a computer.
Unfortunately the SNMP discovery/inventory task is only dedicated to network equipment and is not at all intended to manage computers (this will be the case for the next network discovery plugin).
I don't really have a solution in this case.
normally from an SNMP inventory / discovery the inventory file (related to computer) should not contain a name, so you should match the "Computer constraint (name)" rule
Perhaps you should refine the IP ranges to exclude PCs?
This issue has been closed as we only track bugs here.
You can get community support on forums or you can consider taking a subscription to get professional support. You can also contact GLPI editor team directly.