You are not logged in.
v.10.0.0 and using glpi agent 1.2 with the glpi inventory from the marketplace.
First of all the native glpi agent/inventory is a very cool feature, but...
We use "all in one" computers and the agent imported my test computer as both a computer and a monitor into assets. Is there any rule or something I can make that will not create these duplicates?
Offline
Hi Opcero,
this looks like a possible bug. Can you share the output of the following command to see if this permits to reproduce the case:
glpi-inventory --partial monitor
Don't forget to obfuscate any sensible data in the output.
GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer
Offline
c:\Program Files\GLPI-Agent>glpi-inventory --partial monitor
[info] New inventory from computer.domain.org-2022-06-06-09-29-20 for local0
{
"action": "inventory",
"content": {
"bios": {
"assettag": "",
"bdate": "2021-12-08",
"biosserial": "5Hxxxx2",
"bmanufacturer": "Dell Inc.",
"bversion": "1.18.0",
"enclosureserial": "5Hxxxx2",
"mmodel": "0X2MKR",
"msn": "/5Hxxxx2/CN7443165G0CT9/",
"smanufacturer": "Dell Inc.",
"smodel": "OptiPlex 7440 AIO",
"ssn": "5Hxxxx2"
},
"hardware": {
"chassis_type": "All in One",
"memory": 16077,
"name": "computer name",
"uuid": "4C4Cxxxx-xxxx-xxxx-xxxx-xxxxxxx24432",
"vmsystem": "Physical",
"winlang": "1033",
"winowner": "me",
"winprodid": "00342-xxxx-xxxxx-xxxxx",
"winprodkey": "PW9N4-xxxxx-xxxxx-xxxxx-9D782",
"workgroup": "domain.org"
},
"monitors": [
{
"base64": "AP///////wAQrOyT8gYiACcXAQOAMx14CsZloFlYnScOUFQhCADRwIHAgYCVALMAAQEBAQEBAjqAGHE4LUCULEUI/h8RAAAeZiFQsFEAGzBAcDYA/h8RAAAeAAAA/ABPcHRpUGxleCA3NDQwAAAA/QAxSxxfCQAKICAhICAgAWA=",
"caption": "OptiPlex 7440",
"description": "39/2013",
"manufacturer": "Dell Inc.",
"serial": "00xxxx2"
},
{
"base64": "AP///////wAQrB7QTEhBMgoTAQNoLx54LjegplVImiYSUFSlSwBxT4GAAQEBAQEBAQEBAQEBITmQMGIaJ0BosDYA2SgRAAAcAAAA/wBGMTgwRzkzNTJBSEwKAAAA/QA4Sx5TEAAKICAgICAgAAAA/ABERUxMIEUyMjA5VwogAKE=",
"caption": "DELL E2209W",
"description": "10/2009",
"manufacturer": "Dell Inc.",
"name": "DELL E2209W(Analog)",
"serial": "F1xxxxxxxxxxL",
"type": "DELL E2209W(Analog)"
}
],
"versionclient": "GLPI-Inventory_v1.2"
},
"deviceid": "computer.domain.org-2022-06-06-09-29-20",
"itemtype": "Computer"
}
c:\Program Files\GLPI-Agent>
Last edited by Opcero (2022-06-06 18:41:53)
Offline
Indeed, this is not really a duplicate as the computer is itself a monitor with a serialnumber dedicated to the monitor.
But you can simply add a rule which refuses to import any monitor which contains "OptiPlex" in name.
Here is the export of such a rule a successfuly used on your sample:
<rules>
<rule>
<entities_id>Root entity</entities_id>
<sub_type>RuleImportAsset</sub_type>
<ranking>36</ranking>
<name>Skip OptiPlex as monitor</name>
<description/>
<match>AND</match>
<is_active>1</is_active>
<comment/>
<is_recursive>0</is_recursive>
<uuid>634b7393-6f8bf73d-629e329841cbe3.05716974</uuid>
<condition>0</condition>
<date_creation>2022-06-06 19:00:08</date_creation>
<rulecriteria>
<criteria>itemtype</criteria>
<condition>0</condition>
<pattern>Monitor</pattern>
</rulecriteria>
<rulecriteria>
<criteria>name</criteria>
<condition>8</condition>
<pattern>1</pattern>
</rulecriteria>
<rulecriteria>
<criteria>name</criteria>
<condition>2</condition>
<pattern>OptiPlex</pattern>
</rulecriteria>
<ruleaction>
<action_type>assign</action_type>
<field>_ignore_import</field>
<value>1</value>
</ruleaction>
</rule>
</rules>
GLPI-Agent developer from Teclib' and GLPI-Network team
Previously FusionInventory-Agent maintainer
Offline