# Can we have Elastic agent policy for Dev and Prod Environments

**URL:** <https://discuss.elastic.co/t/can-we-have-elastic-agent-policy-for-dev-and-prod-environments/355591>\
**Category:** Elastic Agent\
**Created:** [March 18, 2024, 10:58am UTC](https://discuss.elastic.co/t/can-we-have-elastic-agent-policy-for-dev-and-prod-environments/355591 "2024-03-18T10:58:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![manukoli1986](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manukoli1986/32/132736_2.png) [@manukoli1986](https://discuss.elastic.co/u/manukoli1986)\
**Post date:** [March 18, 2024, 10:58am UTC](https://discuss.elastic.co/t/can-we-have-elastic-agent-policy-for-dev-and-prod-environments/355591/1 "2024-03-18T10:58:48Z")

</div>

We were using beat prior to elastic agent. Now our requirement is Elastic agent to provision on dev and prod instances.

I have gone thru the documentation process of how to setup and configure Elastic agent on remote host but that pop up few queries in my mind which are referring below.

1. Do we have to use multiple policies for each and every environment or can we have single policy which can used as common and uses variable.
2. There is an option called "Namespace" which we see during configuiring agent policy. Will that work or not?
3. Can we use modules which were being used by metricbeats. Can we use the same modules by elastic agent, if yes, then how?
4. Considerations on how to implement variables like we do now (eg. fields.env, any tags, etc)
5. Consideration of using different policies for other teams with different needs (eg. filebeat configured for logs in different locations, etc)

Any suggestion will be helpful.

---

<div class="post-metadata">

**Author:** ![lesio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lesio/32/89323_2.png) [@lesio](https://discuss.elastic.co/u/lesio)\
**Post date:** [March 18, 2024, 11:04am UTC](https://discuss.elastic.co/t/can-we-have-elastic-agent-policy-for-dev-and-prod-environments/355591/2 "2024-03-18T11:04:11Z")

</div>

I believe multiple policies is the standard way when working with 8.x

---

<div class="post-metadata">

**Author:** ![manukoli1986](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manukoli1986/32/132736_2.png) [@manukoli1986](https://discuss.elastic.co/u/manukoli1986)\
**Post date:** [March 18, 2024, 12:49pm UTC](https://discuss.elastic.co/t/can-we-have-elastic-agent-policy-for-dev-and-prod-environments/355591/3 "2024-03-18T12:49:55Z")

</div>

@lesio, thanks for reply and yes I am aware about multiple policies approach however I want to know whether is it possible to have single policy and use it for other envs accordingly.

---

<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 15, 2024, 12:50pm UTC](https://discuss.elastic.co/t/can-we-have-elastic-agent-policy-for-dev-and-prod-environments/355591/4 "2024-04-15T12:50:51Z")

</div>

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