14 Nov 2022 08:09 PM
Use case & Goal:
Applicable to both "GCP > GKE" and "Openshift". We intend to retrieve list of project ID (gce project id if apply), project name(gce project name if apply), namespace, PODs, cluster name, process group name ( if present).
Question: which API we can use to grab above? namespace is must-have info.
Solved! Go to Solution.
15 Nov 2022 09:53 AM - edited 15 Nov 2022 09:54 AM
Hi @avrildong,
Maybe there is a more simple way but I would use the from the Enviroment Api v2 Monitored entities set.
I have just created a auto tag for Kubernetes entities.
Then I have used thre Get / entities Api with with the Entity Selector Type("Process_Group_Instance"),Tag("Kubernetes"). So I have already received the a list of kubernetes process group list.
From the list I have picked up a process group instance and checked it with the following Api call: GET / entities/({entityId}:
I have already received the properties:
Try and play with these Monitored entities API calls.
I hope it helps.
Best regards,
Mizső
18 Nov 2022 11:55 PM - edited 19 Nov 2022 12:00 AM
Thanks for your approach! It works.
FYI one more approach I just got from other parties and it works too, similar principle as yours using same identifier "kubernetesNamespaces".
api/v1/entity/infrastructure/processes > identify via "kubernetesNamespaces" , no need to custom tag (save one step), just straight use that.
So as of now 2 API - either: