zabbix / community-templates

Zabbix Community Templates repository
https://share.zabbix.com
MIT License
1.34k stars 1.8k forks source link

Kube by Prom API does not discover/monitor pods with same name under different namespaces #309

Open sumukharaj opened 10 months ago

sumukharaj commented 10 months ago

Kube by Prom API (Discovery) discovers pods with same name but under different namespaces. For example in the below screenshot, there are several pods with the name ai-postgres-0 but the template will discover only one image

Similarly the Kube Pod by Prom API template will collect data for only one of the pods. not the rest of them.

A change in host Prototype for the discovery template works only for discovery. but not for metric collection.

For example: change Host Prototype from "{#PODNAME}" to "{#PODNAME}_{#NAMESPACE}" will allow discovery of multiple pods with same name but different namespaces. but the metrics will not be fetched by Kube Pod by Prom API template