Hi Team,
I've a problem while fetching the metrics for the dedicated deployment. I don't see any deployment related metrics in Prometheus to get the deployment specific resource usage with kube-state-metrics.
For Example: When I use the regex for a pod_name on container specific metric its populating all #thanos related metrics including sub components like; thanos-receiver, thanos-frontend, etc. My current PromQL is as follows. It should show thanos deployment metrics only, please look into this issue and help me out!
sum(container_memory_working_set_bytes{container_name!="", container_name!="POD", pod_name=~"thanos-(([a-z0-9]*)|([a-z0-9]*-[a-z0-9]*)|[0-9])", namespace="$namespace", k8s_cluster="$cluster_name"}) by (id,pod_name)
Current output:
{pod_name="thanos-6c4d9c7bf7-ggnem"}
{pod_name="thanos-6c4d9c7bf7-h6tld"}
{pod_name="thanos-receiver-0"}
{pod_name="thanos-receiver-1"}
Expected output:
{pod_name="thanos-6c4d9c7bf7-ggnem"}
{pod_name="thanos-6c4d9c7bf7-h6tld"}
Looking forward to hearing from you, thanks!
Best Regards,
Moksha