Closed tilmanKranz closed 1 year ago
Hello Yes for all.
Hi @tilmanKranz ,
We are always open to suggestions for improvement. If you do a PR, we will test it and give you feedback :)
Best regards, Charlene
Hi,
Since there was no answer, I'll close this issue now.
Regards, Charlene
General informations
Operating system : Ubuntu 20.04 (but also generally) Perl version : 5.30 (but also older)
OCS Inventory informations
Unix agent version : 2.4.2-3 (but also latest)
Problem's description
We inventarize Docker containers (Miscellaneous -> Virtual Machines -> Operating system VM "Docker Container").
The field "Name VM" is acquired from the content of "Hostname" in the output of
docker inspect < CONTAINER ID >
. We find the information not very useful and would prefer, as "Name VM" for a "Docker Container" to have the name of the container (either random-generated or explicitly set withdocker container run --name < NAME > ...
). We currently maintain an (inhouse) patch toDocker.pm
that accomplishes this.We interpret the content of "Name" in the output of
docker inspect < CONTAINER ID >
using JSON:PP because there are multiple "Name" properties in the output.Additionally, we also inventarize non-running containers. This is accomplished by iterating
docker ps -a
instead ofdocker ps
.Questions:
Is it acceptable to introduce JSON:PP (pure-Perl implementation of JSON parsing) as additional mandatory dependency?
Is it acceptable to inventarize the "Name" instead of "Hostname" of Docker containers as "VM Name"?
Is it acceptable to inventarize non-running containers ("Statut VM" would be, for example, "exited"), too?
If all anwers are "yes", then i would gladly prepare and submit a PR that implements this.
As a perspective, we could also propose several cleanups/improvements to other fieds such as "UUID" and "Type VM", all production-based, as they are used by our teams.