Report for containers against Openshift


#1

I’m struggling to create an accurate report. Can anyone assist?
The report is against an Openshift provider

Report headings:

PROVIDER_NAME || OPENSHIFT_PROJECT_NAME || POD_NAME || CONTAINER_NAME || PRIMARY SOFTWARE (e.g. PID 0 in POD apache/jboss/nginx etc…) || STATE=“Running”


#2

@gtanzillo Can you help out here? cc @simon3z @cben


#3

Hi @maddop, what part you struggling with, creating the report with those particular columns or you have a report and the data in not accurate? Or something else?

If you have a report, can export it and put the output in a gist so we can take a look at it?


#4

This I think is the only non-trivial part. We don’t have data on what the process tree inside the container actually looks like at run time. We do have:

  • command line (sometimes very long)
  • docker image name
    • registry image came from
  • various metadata for images from openshift’s internal registry, plus various build info for images built by openshift.
  • if you activate image scanning, additional data on software included in images that were scanned.

Depends on what exactly you want, but for a short report column, image name is probably good.


#5

Hi,
thanks for the replies.

PRIMARY SOFTWARE
I’m trying to obtain a high level report to demonstrate we know what software is running in our containers and who it belongs to etc…

I thought a quick first attempt would be to flag what PID0 process is running. So i’ve attempted the following:

  • “command line” and “entrypoint” but these are not great as you highlight,
  • Tags - no consistency here just yet - i’m currently reworking our internal policies to enforce standards for tags (this will help in the long run!)
  • image scanning - i’ve just enabled this so i’ll have a play with the outputs from the reports.

REPORT CONTENTS
I’m seeing completely inconsistent results from my reports.

Some examples are:

  • Provider Name is not always reported - some rows have it, some do not!
  • Openshift Project Name - some rows have it populated and some dont
  • Pod name - i’m seeing multiple entries of the same Pod name
  • Container name - I’m seeing multiple entries of the same container name
  • State - this varies but my main issue here is that the filter does not work on this column. I would like to just list “running containers” but the report ignores a filter and prints all.

I’ll upload a sample report to gist and share.


#6

Ignore the issues with data. It turned out one of my providers was corrupt and caused the inconsistent data issues.