# RDS module only getting metrics of one instance

**URL:** <https://discuss.elastic.co/t/rds-module-only-getting-metrics-of-one-instance/208938>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [November 21, 2019, 4:44pm UTC](https://discuss.elastic.co/t/rds-module-only-getting-metrics-of-one-instance/208938 "2019-11-21T16:44:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![miguel.d](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@miguel.d](https://discuss.elastic.co/u/miguel.d)\
**Post date:** [November 21, 2019, 4:44pm UTC](https://discuss.elastic.co/t/rds-module-only-getting-metrics-of-one-instance/208938/1 "2019-11-21T16:44:27Z")

</div>

Hello!

We tried the rds module with basic settings

```
- module: aws
  period: 60s
  metricsets:
    - rds
  access_key_id: 'accesskey'
  secret_access_key: 'secretkey'

```

It is able to pull all the db\_instance properly but all of the other fields return the same, which is true for one of the instances but not all of it.

Here's an example index output from ES:

```
  "rds": {

    "free_storage.bytes": 18326547660.8,

    "read_io.ops_per_sec": 0.23332555581480618,

    "maximum_used_transaction_ids": 45875,

    "db_instance": {

      "arn": "arn:aws:rds:ca-central-1:xxxxx:db:sampledb1",

      "class": "db.t2.micro",

      "identifier": "sampledb1",

      "status": "available"

    },

    "transaction_logs_generation": 223696.2350282486,

    "disk_queue_depth": 0.06960639691711205,

    "disk_usage": {

      "bin_log.bytes": 5874.8,

      "replication_slot.mb": 4096,

      "transaction_logs.mb": 2348818769

    }

   

   

  "rds": {

    "free_storage.bytes": 18326547660.8,

    "read_io.ops_per_sec": 0.23332555581480618,

    "maximum_used_transaction_ids": 45875,

    "db_instance": {

      "arn": "arn:aws:rds:ca-central-1:xxxxx:db:sampledb2",

      "class": "db.t2.micro",

      "identifier": "sampledb2",

      "status": "available"

    },

    "transaction_logs_generation": 223696.2350282486,

    "disk_queue_depth": 0.06960639691711205,

    "disk_usage": {

      "bin_log.bytes": 5874.8,

      "replication_slot.mb": 4096,

      "transaction_logs.mb": 2348818769

    }

   

   

  "rds": {

    "free_storage.bytes": 18326547660.8,

    "read_io.ops_per_sec": 0.23332555581480618,

    "maximum_used_transaction_ids": 45875,

    "db_instance": {

      "arn": "arn:aws:rds:ca-central-1:xxxxx:db:sampledb3",

      "class": "db.t2.micro",

      "identifier": "sampledb3",

      "status": "available"

    },

    "transaction_logs_generation": 223696.2350282486,

    "disk_queue_depth": 0.06960639691711205,

    "disk_usage": {

      "bin_log.bytes": 5874.8,

      "replication_slot.mb": 4096,

      "transaction_logs.mb": 2348818769

    }
```

---

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [November 21, 2019, 10:03pm UTC](https://discuss.elastic.co/t/rds-module-only-getting-metrics-of-one-instance/208938/2 "2019-11-21T22:03:46Z")

</div>

Hi @miguel.d, what version of metricbeat are you running? Let me try to reproduce it on my side and see what we can do to fix this. Thanks!

---

<div class="post-metadata">

**Author:** ![miguel.d](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@miguel.d](https://discuss.elastic.co/u/miguel.d)\
**Post date:** [November 21, 2019, 10:58pm UTC](https://discuss.elastic.co/t/rds-module-only-getting-metrics-of-one-instance/208938/3 "2019-11-21T22:58:54Z")

</div>

Hi @Kaiyan_Sheng, we are using 7.4.

Thanks!

---

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [November 22, 2019, 4:01am UTC](https://discuss.elastic.co/t/rds-module-only-getting-metrics-of-one-instance/208938/4 "2019-11-22T04:01:37Z")

</div>

@miguel.d Thank you! I was able to reproduce it and it is a bug in my code 😂 I'm working on a PR to fix this: [https://github.com/elastic/beats/pull/14702](https://github.com/elastic/beats/pull/14702)

Mean time, if you want to give `cloudwatch` metricset a try with namespace AWS/RDS, that should collect all the rds metrics for you as a workaround. For example:

```auto
- module: aws
  period: 300s
  metricsets:
    - cloudwatch
  metrics:
    - namespace: AWS/RDS
  access_key_id: 'accesskey'
  secret_access_key: 'secretkey'

```

---

<div class="post-metadata">

**Author:** ![miguel.d](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@miguel.d](https://discuss.elastic.co/u/miguel.d)\
**Post date:** [November 22, 2019, 4:59pm UTC](https://discuss.elastic.co/t/rds-module-only-getting-metrics-of-one-instance/208938/5 "2019-11-22T16:59:18Z")

</div>

@Kaiyan_Sheng That's exactly what we use as a workaround! 😄

Looking forward for the fix!

Thanks!

---

<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:** [December 20, 2019, 5:11pm UTC](https://discuss.elastic.co/t/rds-module-only-getting-metrics-of-one-instance/208938/6 "2019-12-20T17:11:42Z")

</div>

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