That's two different things you're asking.

* alerting only from "devsecops" namespace: ensure every metric has a label 
with the namespace, and configure alerting rules to match only where 
namespace=devsecops

* scraping only from one namespace: if you can't configure the scrape URL 
to fetch only one namespace, then you can use metric_relabel_rules to 
discard all metrics except the ones of interest (again, matching on some 
namespace label to identify which ones to keep or drop)

On Sunday, 26 March 2023 at 07:28:36 UTC+1 Himanshu Gude wrote:

> Hello guys,
>
> There is a requirement in my project which states that, the client only 
> wants alerts from "devsecops" namespace and alerts from all other 
> namespaces should be ignored. which means alerts from namespaces other than 
> "devsecops" should not be captured by the alertmanager and should not 
> trigger tickets in ServiceNow.
>
> In short, prometheus should only scrape metrics from only one namespace 
> ie; devsecops
>
> would really appreciate some sort of hel here.
> Thanks in advance....
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/6e05f920-3c76-4f80-8360-d272e3e7bea2n%40googlegroups.com.

Reply via email to