# Metrics relabeling issue

**URL:** <https://discuss.prometheus.io/t/metrics-relabeling-issue/1675>\
**Category:** General Help/Support\
**Created:** [May 30, 2023, 9:17am UTC](https://discuss.prometheus.io/t/metrics-relabeling-issue/1675 "2023-05-30T09:17:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebeltramo96](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/ebeltramo96/32/716_2.png) [@ebeltramo96](https://discuss.prometheus.io/u/ebeltramo96)\
**Post date:** [May 30, 2023, 9:17am UTC](https://discuss.prometheus.io/t/metrics-relabeling-issue/1675/1 "2023-05-30T09:17:46Z")

</div>

Hello,

I’m facing an issue where I can’t properly save a metric;  
Inside a k8s cluster I have a rule inside a `servicemonitor.yaml` file that drops any metric coming from namespaces that match a specific regex, something like:

```auto
    - sourceLabels: [namespace]
      regex: z{3,6}
      action: drop

```

this works, but now I have to implement a way to save a single metric, specifically `kube_namespace_created` before dropping all the others, only for those namespace that match the regex.

Can someone give me an heads up? Thanks
