# Prometheus data in ElasticSearch via Metricbeats

**URL:** <https://discuss.elastic.co/t/prometheus-data-in-elasticsearch-via-metricbeats/239768>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 3, 2020, 9:50am UTC](https://discuss.elastic.co/t/prometheus-data-in-elasticsearch-via-metricbeats/239768 "2020-07-03T09:50:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jalpesh1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@Jalpesh1](https://discuss.elastic.co/u/Jalpesh1)\
**Post date:** [July 3, 2020, 9:50am UTC](https://discuss.elastic.co/t/prometheus-data-in-elasticsearch-via-metricbeats/239768/1 "2020-07-03T09:50:14Z")

</div>

Hi Team,

We are scaling Prometheus data in Elastic via Metricbeats .  
But there are lot of metrics exposed in Prometheus .  
We want only few metrics in Elastic , is there any filtering possible to restrict metrics?

Currently we are getting around 1,50,000 metrics per minute , we only want 100-200 metrics in Elastic for long term storage .

Please suggest.

Thanks & Regards,  
Jalpesh

---

<div class="post-metadata">

**Author:** ![Jalpesh1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@Jalpesh1](https://discuss.elastic.co/u/Jalpesh1)\
**Post date:** [July 4, 2020, 1:15pm UTC](https://discuss.elastic.co/t/prometheus-data-in-elasticsearch-via-metricbeats/239768/2 "2020-07-04T13:15:56Z")

</div>

Hi Team,

We have below Sample doc having multiple prometheus metrics and we want only 3 metrics from this doc

```auto
        "elasticsearch_thread_pool_threads_count": 1,
        "elasticsearch_thread_pool_largest_count": 2,
        "elasticsearch_thread_pool_completed_count": 43,

```

Sample doc :

```auto
{
  "_index": "metricbeat-7.6.0",
  "_type": "_doc",
  "_id": "-WcQP1l",
  "_version": 1,
  "_score": null,
  "_source": {
    "@timestamp": "2020-03-04T10:04:46.588Z",
    "service": {
      "type": "prometheus",
      "address": "localhost:9114"
    },
    "event": {
      "duration": 45004100,
      "dataset": "prometheus.collector",
      "module": "prometheus"
    },
    "prometheus": {
      "metrics": {
        "elasticsearch_thread_pool_threads_count": 1,
        "elasticsearch_thread_pool_queue_count": 0,
        "elasticsearch_thread_pool_largest_count": 2,
        "elasticsearch_thread_pool_completed_count": 43,
        "elasticsearch_thread_pool_active_count": 0,
        "elasticsearch_thread_pool_rejected_count": 0
      },
      "labels": {
        "job": "prometheus",
        "cluster": "elasticsearch",
        "es_client_node": "true",
        "name": "vsvsdvdf",
        "es_master_node": "true",
        "type": "ml_utility",
        "instance": "localhost:9114",
        "host": "xyz",
        "es_data_node": "true",
        "es_ingest_node": "true"
      }
    },
    "ecs": {
      "version": "1.4.0"
    },
    "host": {
      "architecture": "x64",
      "name": "ABC",
      "os": {
        "kernel": "107)",
        "build": "1443",
        "platform": "win",
        "version": "10.0",
        "family": "windows",
        "name": "Win"
      },
      "id": "50cf7",
      "hostname": "D1"
    },
    "agent": {
      "hostname": "D1",
      "id": "9a",
      "version": "7.6.0",
      "type": "metricbeat",
      "ephemeral_id": "c23"
    },
    "metricset": {
      "name": "collector",
      "period": 10000
    }
  },
  "fields": {
    "@timestamp": [
      "2020-03-04T10:04:46.588Z"
    ]
  },
  "sort": [
    1583316286588
  ]
}

```

If there is NO metric available out of that **3 metrics** then this doc should drop.

Regards,  
Jalpesh

---

<div class="post-metadata">

**Author:** ![Jalpesh1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@Jalpesh1](https://discuss.elastic.co/u/Jalpesh1)\
**Post date:** [July 7, 2020, 1:44pm UTC](https://discuss.elastic.co/t/prometheus-data-in-elasticsearch-via-metricbeats/239768/3 "2020-07-07T13:44:55Z")

</div>

Anyone ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 4, 2020, 3:44pm UTC](https://discuss.elastic.co/t/prometheus-data-in-elasticsearch-via-metricbeats/239768/4 "2020-08-04T15:44:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
