# Split Prometheus datasource based on exporter

**URL:** <https://community.grafana.com/t/split-prometheus-datasource-based-on-exporter/34528>\
**Category:** Prometheus\
**Created:** [August 1, 2020, 7:42pm UTC](https://community.grafana.com/t/split-prometheus-datasource-based-on-exporter/34528 "2020-08-01T19:42:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mormor83](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/mormor83/32/12261_2.png) [@mormor83](https://community.grafana.com/u/mormor83)\
**Post date:** [August 1, 2020, 7:42pm UTC](https://community.grafana.com/t/split-prometheus-datasource-based-on-exporter/34528/1 "2020-08-01T19:42:49Z")

</div>

Hi All  
I would like to separate my Prometheus data source into different distinct data sources based on the metrics in Prometheus for example:  
Prometheus-RabbirMQ --\> will filter only metrics starting with RabbitMQ  
Prometheus-Elasticsearch --\> will filter only metrics starting with Elasticsearch

Is it possible to reach such granularity ?

---

<div class="post-metadata">

**Author:** ![b0b](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/b0b/32/8761_2.png) [@b0b](https://community.grafana.com/u/b0b)\
**Post date:** [September 4, 2020, 11:31am UTC](https://community.grafana.com/t/split-prometheus-datasource-based-on-exporter/34528/2 "2020-09-04T11:31:18Z")

</div>

Hi @mormor83,

any particular reason why you want to do that split at data source level? I have usually wanted to include more data per data source instead of sharding it there.  
Just curious 🙂

---

<div class="post-metadata">

**Author:** ![kennethmoria](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@kennethmoria](https://community.grafana.com/u/kennethmoria)\
**Post date:** [September 4, 2020, 12:45pm UTC](https://community.grafana.com/t/split-prometheus-datasource-based-on-exporter/34528/3 "2020-09-04T12:45:10Z")

</div>

Hi,

I would like this aswell. My reason for this is, that we have multible HAProxy Clusters. I would like to seperate does in grafana.

I am a new user and I dont know prometheus and grafana that well. So if there is another way, I would love to hear this.

---

<div class="post-metadata">

**Author:** ![mormor83](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/mormor83/32/12261_2.png) [@mormor83](https://community.grafana.com/u/mormor83)\
**Post date:** [September 4, 2020, 1:06pm UTC](https://community.grafana.com/t/split-prometheus-datasource-based-on-exporter/34528/4 "2020-09-04T13:06:57Z")

</div>

Hi @b0b  
This is to separate it to different users using the grafana enterprise license ( datasource permission) Not all teams uses Elastic and i would like to “give” the ones that do that datasource.  
Is it possible?

---

<div class="post-metadata">

**Author:** ![b0b](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/b0b/32/8761_2.png) [@b0b](https://community.grafana.com/u/b0b)\
**Post date:** [September 4, 2020, 2:47pm UTC](https://community.grafana.com/t/split-prometheus-datasource-based-on-exporter/34528/5 "2020-09-04T14:47:28Z")

</div>

With PromQL you can easily filter on any tags and make them variables for a dashboard.

For the OT  
How to split a data source, now that is something else. It _might_ be possible using _Custom Query Parameters_ but I have not tried doing anything like that.
