Skip to content
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

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

Open
raulk89 opened this issue Jan 13, 2023 · 9 comments
Open

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

raulk89 opened this issue Jan 13, 2023 · 9 comments

Comments

@raulk89
Copy link

raulk89 commented Jan 13, 2023

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
Copy link
Author

raulk89 commented Jan 13, 2023

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
Copy link
Contributor

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
Copy link
Author

raulk89 commented Jan 13, 2023

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
Copy link
Member

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

@raulk89
Copy link
Author

raulk89 commented Jan 13, 2023

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
Copy link
Contributor

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
Copy link
Author

raulk89 commented Jan 13, 2023

We run it only on VM.

Raul

@g-bougard
Copy link
Contributor

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
Copy link
Author

raulk89 commented Jan 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants