# Running filebeat as ECS daemon

**URL:** https://discuss.elastic.co/t/running-filebeat-as-ecs-daemon/224958
**Category:** Beats
**Tags:** filebeat
**Created:** [March 25, 2020, 9:00am UTC](https://discuss.elastic.co/t/running-filebeat-as-ecs-daemon/224958 "2020-03-25T09:00:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Alexander\_Popov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexander_popov/32/7154_2.png) [@Alexander\_Popov](https://discuss.elastic.co/u/Alexander_Popov)
#### Post date: [March 25, 2020, 9:00am UTC](https://discuss.elastic.co/t/running-filebeat-as-ecs-daemon/224958/1 "2020-03-25T09:00:57Z")

</div>

I want to run filebeat as AWS ECS [daemon](https://docs.aws.amazon.com/AmazonECS/latest/userguide/ecs_services.html#service_scheduler_daemon)

My plan is to attach volume in filebeat daemon as `/var/log/app`  
and same volumes in all app containers.  
Each container will write logs in `/var/log/app/$container_id` folder

questions:

1. is my plan ok? or there is better solutions?
2. can I expose folder ($container\_id) name as additional parameter when sending logs?

---

<div class="post-metadata">

### Author: ![ConorTier](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@ConorTier](https://discuss.elastic.co/u/ConorTier)
#### Post date: [March 25, 2020, 9:07am UTC](https://discuss.elastic.co/t/running-filebeat-as-ecs-daemon/224958/2 "2020-03-25T09:07:02Z")

</div>

hey perhaps see my description of a setup

if daemon and 3 nodes in cluster then 3 filebeat instances all reading from 1 volumn - could be a problem, and daemon will have root access to node but not pods files as far ias i know - my testing

> [@Filebeats Kubernetes File close due to inactive of 5min](https://discuss.elastic.co/t/filebeats-kubernetes-file-close-due-to-inactive-of-5min/224855/2):
>
> Little more background in case it helps - Microservices created in .net core - using log4net logging - file appender - this should not matter as its just creating a something.log file with a specific format for each log output. Havent changed the scan\_frequency - default is 10 seconds and close\_inactive is still at its default - (5 mintues) In theory once a log entry is entered every 10 minutes as example - it should appear to filebeat output every 10 minutes and 10 seconds - note logs dont co…

---

<div class="post-metadata">

### Author: ![Alexander\_Popov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexander_popov/32/7154_2.png) [@Alexander\_Popov](https://discuss.elastic.co/u/Alexander_Popov)
#### Post date: [March 25, 2020, 2:49pm UTC](https://discuss.elastic.co/t/running-filebeat-as-ecs-daemon/224958/3 "2020-03-25T14:49:44Z")

</div>

daemon runs one per instance not a container  
so If have 3 instances and 3 containers up on each instance in cluster - total 9 containers  
I will have 3 filebeat instances each have own volume mounted to host directory

---

<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: [April 22, 2020, 2:49pm UTC](https://discuss.elastic.co/t/running-filebeat-as-ecs-daemon/224958/4 "2020-04-22T14:49:52Z")

</div>

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