fusioninventory / fusioninventory-agent

FusionInventory Agent

Home Page:http://fusioninventory.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to skip importing type=docker from virtual machines

raulk89 opened this issue · comments

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

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

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.

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

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

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

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.

We run it only on VM.

Raul

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

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