New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switchports get deleted on netdiscovery #559
Comments
Switch inventory attached |
Hi @GuidoWilden this seems to be a server-side problem. @stonebuzz can you put your 2 cents on that issue ? |
It's definitely the discovery task causing it. If I run only the inventory task and leave the discovery task out all is fine. |
Hi @GuidoWilden How inventory file is injected in GLPI? GUI ? glpi-agent? glpi-injector? |
idem for discovery file ? |
Sorry I don't think I understand. The output of the discovery looks like this. Is this what you meant?
|
Honestly, it's going to be complicated for me to reproduce (I already don't have the problem on my network equipment). On my side, I have to inject the XML file, which isn't really identical to what the plugin does (it changes the On GLPI there is a protection to prevent a if ($this->is_discovery === true && !$this->isNew()) {
//if NetworkEquipment
//Or printer that has not changed its IP
//do not update to prevents discoveries to remove all ports, IPs and so on found with network inventory
if (
$itemtype == NetworkEquipment::getType()
||
(
$itemtype == Printer::getType()
&& !AssetPrinter::needToBeUpdatedFromDiscovery($this->item, $val)
)
) {
//only update autoupdatesystems_id, last_inventory_update, snmpcredentials_id
$input = $this->handleInput($val, $this->item);
$this->item->update(Sanitizer::sanitize(['id' => $input['id'],
'autoupdatesystems_id' => $input['autoupdatesystems_id'],
'last_inventory_update' => $input['last_inventory_update'],
'snmpcredentials_id' => $input['snmpcredentials_id'],
'is_dynamic' => true
]));
//add rule matched log
$rulesmatched = new RuleMatchedLog();
$inputrulelog = [
'date' => date('Y-m-d H:i:s'),
'rules_id' => $rules_id,
'items_id' => $items_id,
'itemtype' => $itemtype,
'agents_id' => $this->agent->fields['id'],
'method' => Request::NETDISCOVERY_TASK
];
$rulesmatched->add($inputrulelog, [], false);
$rulesmatched->cleanOlddata($items_id, $itemtype);
return;
}
} precisely to avoid overwriting SNMP inventory data (with all Can you |
I will try this though I'm pretty certain that everything in the rules is default. I do not remember changing anything in there. |
Hi @stonebuzz, Unfortunately the problem is the same after resetting the rules. |
No nothing that appears to be triggered by the discovery task. We regularly see these php errors on computer inventory. The software seems to struggle with our shared storage that is mounted on pretty much everything, but I always blamed the size (7 PB) for that. I might be wrong though.
But we see nothing in either log during the discovery. |
yes, it's because of disk space (I think it's the first time I've seen a concrete case with this value XD). It's going to be difficult for me to help you with the discovery issue (as I don't reproduce on my side). You should consider taking a subscription to get professional support and a quick fix on this problem. Best regards |
We had the same Problem. We have now updated to GLPI 10.0.11 and GLPI-Agent 1.7.1 and now all our Cisco Switches show up with their Ports in GLPI again. |
My problem unfortunately still exists. |
Closing this one. I no longer have access to this installation since changing jobs. |
Bug reporting acknowledgment
Yes, I read it
Professional support
None
Describe the bug
The switch inventory was created via command line and then imported into glpi. On discovery run through the GUI all details for the switch get deleted. We have a total of 74 switches in our inventory but only one switch (Cisco SG350-10P) is affected by the problem.
To reproduce
Inventory
>upload from file
Expected behavior
Switch details should remain unchanged
Operating system
Linux
GLPI Agent version
Nightly build (git version in additional context below)
GLPI version
Other (See additional context below)
GLPIInventory plugin or FusionInventory for GLPI plugin version
Other (See additional context below)
Additional context
Nightly build v1.7-gitb7e81f7a but happened with all previous builds and 1.6 release as well.
GLPI 10.0.11 but happened in previous build 10.0.10 and 10.0.9 as well.
GLPIInventory plugin 1.3.4 but happened with previous build 1.3.3 as well
The text was updated successfully, but these errors were encountered: