# How Can I use same guardian for different environment

**URL:** <https://community.dynatrace.com/t/how-can-i-use-same-guardian-for-different-environment/46338>\
**Category:** Automations\
**Tags:** site-reliability-guardian\
**Created:** [June 27, 2024, 10:27am UTC](https://community.dynatrace.com/t/how-can-i-use-same-guardian-for-different-environment/46338 "2024-06-27T10:27:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![heramb\_sawant](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@heramb\_sawant](https://community.dynatrace.com/u/heramb_sawant)\
**Post date:** [June 27, 2024, 10:27am UTC](https://community.dynatrace.com/t/how-can-i-use-same-guardian-for-different-environment/46338/1 "2024-06-27T10:27:33Z")

</div>

Hi ,

I am having guardian&nbsp; having objectives(using DQL)&nbsp; to evaluate&nbsp; top 5 service performance.. Guardian is having&nbsp; with 20 objectives&nbsp; , for each service&nbsp; i have added 4 objectives( response time, 5xx Error rate, 4xx error rate, success rate).

I ran guardian for Testing environment&nbsp; and now I want to run the same guardian&nbsp; &nbsp;for production Environment.How Can I do that with minimum effort??

Is it possible to export guardian as code&nbsp; and change the dql parameters and upload it with different name like we do for workflow?

---

<div class="post-metadata">

**Author:** ![jaume\_reverte](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jaume_reverte/32/1479_2.png) [@jaume\_reverte](https://community.dynatrace.com/u/jaume_reverte)\
**Post date:** [August 22, 2024, 7:21am UTC](https://community.dynatrace.com/t/how-can-i-use-same-guardian-for-different-environment/46338/2 "2024-08-22T07:21:05Z")

</div>

Hello Heramb,

You can do a couple of things to make it easy to adapt.

First, use Variables instead of plain text. This will allow you to change only one place and reflect the change everywhere. Here’s a&nbsp;[link](https://docs.dynatrace.com/docs/shortlink/guardian-examples#variables) to the documentation for it.

Then, to quickly deploy/export SRG, you can use monitoring as a code approach, either using MONACO or Terraform—[link](https://docs.dynatrace.com/docs/platform-modules/automations/site-reliability-guardian/config-as-code-srg#create-a-site-reliability-guardian) to the documentation.

Hope you a good monitoring!

---

<div class="post-metadata">

**Author:** ![heramb\_sawant](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@heramb\_sawant](https://community.dynatrace.com/u/heramb_sawant)\
**Post date:** [August 22, 2024, 7:30am UTC](https://community.dynatrace.com/t/how-can-i-use-same-guardian-for-different-environment/46338/3 "2024-08-22T07:30:50Z")

</div>

Hey Thanks for&nbsp; sharing this information . I will follow this approach.

Regards,  
Heramb
