# Metricbeat-Filebeat Install & Run as Docker Container

**URL:** https://discuss.elastic.co/t/metricbeat-filebeat-install-run-as-docker-container/241919
**Category:** Beats
**Tags:** filebeat, metricbeat
**Created:** [July 20, 2020, 5:58pm UTC](https://discuss.elastic.co/t/metricbeat-filebeat-install-run-as-docker-container/241919 "2020-07-20T17:58:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vishakh](https://avatars.discourse-cdn.com/v4/letter/v/c89c15/32.png) [@vishakh](https://discuss.elastic.co/u/vishakh)
#### Post date: [July 20, 2020, 5:58pm UTC](https://discuss.elastic.co/t/metricbeat-filebeat-install-run-as-docker-container/241919/1 "2020-07-20T17:58:05Z")

</div>

**Task Objective:** using aws module (metricbeat + filebeat), I would like to pull logs and metrics from multiple aws accounts from one server.  
Thus reducing the server cost of running beats in each aws account.

To achieve this: Need to install Metricbeat and Filebeat on a docker container running multiple containers of beats that pull logs/metrics from different aws accounts.

Can anyone please guide (or) provide a walk-through on how to implement on a docker  
(or) is there a strategy to pull aws metrics and aws cloudtrail logs from multiple aws accounts while running the beats from one server?

---

<div class="post-metadata">

### Author: ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)
#### Post date: [July 21, 2020, 11:09am UTC](https://discuss.elastic.co/t/metricbeat-filebeat-install-run-as-docker-container/241919/2 "2020-07-21T11:09:05Z")

</div>

Main question here is why placing docker in the ecuation? Just run each Beat once (Filebeat and Metricbeat) with as many configurations as you need.

The question is: strategy to run Metricbeat and Filebeat in one server. Well, the constrains are really hard 😃 I mean, just run them 😄

Or I don't understand the question 😅

---

<div class="post-metadata">

### Author: ![vishakh](https://avatars.discourse-cdn.com/v4/letter/v/c89c15/32.png) [@vishakh](https://discuss.elastic.co/u/vishakh)
#### Post date: [July 21, 2020, 6:02pm UTC](https://discuss.elastic.co/t/metricbeat-filebeat-install-run-as-docker-container/241919/3 "2020-07-21T18:02:35Z")

</div>

Hi @Mario_Castro ,

Reason for running multiple beats for metricbeat and filebeat:

- Via these two agents I would like to pull aws-metrics and aws-cloudtrail logs from **multiple** aws accounts using IAM-Role (profile name) from one single server rather than running the beats in each aws-account.

So, when I configured metricbeat as below - it only honoured only the first profile-name of same metricset. Reference yml snippet below:

```auto
metricbeat.modules:
- module: aws
  period: 300s
  credential_profile_name: <aws-account-1 profile name>
  metricsets:
    - ec2
- module: aws
  period: 300s
  credential_profile_name: <aws-account-2 profile name>
  metricsets:
    - ec2
- module: aws
  period: 300s
  credential_profile_name: <aws-account-1 profile name>
  metricsets:
    - sqs
- module: aws
  period: 300s
  credential_profile_name: <aws-account-2 profile name>
  metricsets:
    - sqs

```

Here I saw the logs for ec2 and sqs metricsets being pulled only from account-1 and not from account-2

So, I thought of running multiple beats parallel. But if my understanding/config is incorrect I would sincerely request a help on this objective

---

<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 18, 2020, 8:02pm UTC](https://discuss.elastic.co/t/metricbeat-filebeat-install-run-as-docker-container/241919/4 "2020-08-18T20:02:41Z")

</div>

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