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

Docker containers not reported in GLPI #787

Open
fabriceverkor opened this issue Oct 9, 2024 · 3 comments
Open

Docker containers not reported in GLPI #787

fabriceverkor opened this issue Oct 9, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@fabriceverkor
Copy link

Bug reporting acknowledgment

Yes, I read it

Professional support

Yes, I know

Describe the bug

A customer noticed that some computers had their Virtual Machine tab filled by their hosted Docker containers, some other no.
We never had a look on this part and we don't know if it is a regression.

To reproduce

  1. launch glpi-agent on computer hosting Docker containers
  2. check that local XML generated file contains a section listing docker containers
  3. In GLPI, the last inventory date of computer is the same than the local file above.
  4. Nothing is reported in Virtual Machine tab of computer
  5. The downloadable JSON file from GLPI interface does contain any virtual machine section

I'm confused.

Expected behavior

Docker containers should be reported in "Virtual Machine" tab of the computer.

Operating system

Linux

GLPI Agent version

v1.10

GLPI version

10.0.x (See additional context below)

GLPIInventory plugin or other plugin version

GLPI Inventory v1.3.4

Additional context

No response

@fabriceverkor fabriceverkor added the bug Something isn't working label Oct 9, 2024
@g-bougard
Copy link
Member

Hi @fabriceverkor

  1. The downloadable JSON file from GLPI interface does contain any virtual machine section

Does or doesn't ? Without any inventory sample I can doubt you forgot a negation here.

If the stored json is a partial inventory (check for a "partial": true in the json), virtualmachines won't be provided if they didn't change since the last VM inventory change or last full inventory.
You should better check the result of the following command run as root on the computer itself:

glpi-inventory --partial=virtualmachine

@fabriceverkor
Copy link
Author

Sorry :
The downloadable JSON file from GLPI interface does NOT contain any virtual machine section
But
glpi-inventory --partial=virtualmachine works fine with a virtualmachines JSON list.

I tested again with glpi-agent --debug
The new local xml file contains containers info, just like the ones reported by glpi-inventory command.

But it is not updated on GLPI side.
And new GLPI JSON file does NOT contain the virtualmachines JSON list above.
But indeed, many sections are missing in GLPI JSON file (controllers, cpus, firewalls, inputs, ..)

Does it mean that GLPI JSON file is just a filtered version of JSON generated by local agent ?
Is it a compliance problem (agent or glpi or glpi inventry plugin versions) ?
Thx

@g-bougard
Copy link
Member

When I'm speaking about partial inventory, this is about this glpi-agent feature: #592

And as I said:

virtualmachines won't be provided if they didn't change since the last VM inventory change or last full inventory.

This is normal and should not be related to your issue as GLPI is not intended to delete from the asset any category not set in a partial inventory.

The real question is: Is any docker container missing from the partial inventory generated by the command I gave you ?

If not, you can manually import it and check if all container are imported. If not, the problem is not glpi-agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants