#general

Troubleshooting Namespace Issues In Alerts with Otel+Signoz

TLDR Ayushman had a query about retrieving their kubectl pod's namespace in alerts using otel+signoz. Prashant and Srikanth gave steps, but found that Ayushman's applications might not be sending the necessary attributes.

Powered by Struct AI
Aug 16, 2023 (3 months ago)
Ayushman
Photo of md5-d3dfb3774f7ca2655a72edb3674c7c31
Ayushman
04:24 PM
Hi team , i am using otel+signoz, is there any way that i can get the namespace of my kubectl pod in alerts ?
Prashant
Photo of md5-1899629483c7ab1dccfbee6cc2f637b9
Prashant
05:53 PM
Hi there šŸ‘‹

You can use k8s namespace in alerts using the following:
{{ .Labels.k8s_namespace_name }}
Ayushman
Photo of md5-d3dfb3774f7ca2655a72edb3674c7c31
Ayushman
06:15 PM
i checked this and grouped by this but this is always "monitoring" where my signoz is deployed and not the services.

I also saw "service_namespace" and that is always "default" where as I have no services in default namespace.
06:16
Ayushman
06:16 PM
i am checking the metric signoz_calls_total should i be checking another metric ?
Aug 17, 2023 (3 months ago)
Prashant
Photo of md5-1899629483c7ab1dccfbee6cc2f637b9
Prashant
05:06 AM
Srikanth can you look into this?
Aug 18, 2023 (3 months ago)
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
04:04 PM
> i checked this and grouped by this but this is always ā€œmonitoringā€ where my signoz is deployed and not the services.
> I also saw ā€œservice_namespaceā€ and that is always ā€œdefaultā€ where as I have no services in default namespace.
In both cases, it is most likely your applications are not sending the k8s.namespace.name , service.namespace attributes.