fusioninventory / fusioninventory-agent

FusionInventory Agent
http://fusioninventory.org/
GNU General Public License v2.0
251 stars 125 forks source link

How to skip importing type=docker from virtual machines #1035

Closed raulk89 closed 4 weeks ago

raulk89 commented 1 year ago

Hi

fusioninventory-agent-2.6-1.el7.x86_64 CentOS Linux 7

My question is, how we can skip importing dockers to glpi inventory ..? At the moment if we have N amount dockers running from virtual machine, then it will discovery each docker as a new entity. We do not want that.

Is there a possibility to disable discovering those..?

Regards Raul

raulk89 commented 1 year ago

Temporary hack, that will work:

Modifying first row of file:
/usr/share/fusioninventory/lib/FusionInventory/Agent/Task/Inventory/Virtualization/Docker.pm

package FusionInventory::Agent::Task::Inventory::Virtualization::Docker;
-->
#package FusionInventory::Agent::Task::Inventory::Virtualization::Docker;

But that will be overwritten by future releases. So looking for a more permanent solution.

Raul

g-bougard commented 1 year ago

If you don't have any other virtualization type on this computer, the best way should be to use: no-category = virtualmachine If you have other types of virtualization, just remove the file you modified. If you don't see new fi-agent release, you should probably take a look at glpi-agent which is a fork of fusioninventory-agent with a lot of fixes and new features.

raulk89 commented 1 year ago

This parameter also works yes. Thanks.

Is this a feature, that glpi software (GLPI 10.0.5) loses all the dependencies for the VM where certain docker container resides..?

At the moment, from glpi UI, there is no link from the docker container to the VM it resides. Each container is separate entity. When I deleted VM (and emptied trash bin), all the containers remained intact.

Seems odd, that there is no link to the VM.

Raul

ddurieux commented 1 year ago

it's a simple link, so yes if you delete the computer, the VMs are not deleted

raulk89 commented 1 year ago

No I mean, type=docker is running on certain VM. There seems no link between those. When I delete VM, the dependent docker items should also be deleted.

Raul

g-bougard commented 1 year ago

It depends where you're running the agent. Do you run it into docker ? and the VM ? The link can only be created if you run it into the two ends.

raulk89 commented 1 year ago

We run it only on VM.

Raul

g-bougard commented 1 year ago

You're using GLPI 10.0.5 ? Do you use native inventory or FusionInventory for GLPI Plugin ? If you're using GLPI 10, what did you configure in inventory Administration regarding "Virtualization": image

raulk89 commented 1 year ago

We use "FusionInventory" at the moment. We did this change from both.

FusionInventory: image

Native Inventory: image

No luck. Still those type=docker entities were created.

Raul

ddurieux commented 4 weeks ago

GLPI is not longer supported.