# Keeping host metrics after setting it up again (AWS)

**URL:** <https://community.dynatrace.com/t/keeping-host-metrics-after-setting-it-up-again-aws/19103>\
**Category:** Cloud platforms\
**Tags:** aws, oneagent, hosts-classic\
**Created:** [January 15, 2019, 8:35am UTC](https://community.dynatrace.com/t/keeping-host-metrics-after-setting-it-up-again-aws/19103 "2019-01-15T08:35:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [January 15, 2019, 8:35am UTC](https://community.dynatrace.com/t/keeping-host-metrics-after-setting-it-up-again-aws/19103/1 "2019-01-15T08:35:11Z")

</div>

Hello,

our client deployment process contains killing host and creating it once again with one agent and new application build. Unfortunately the problem is that after each deployment metrics for this host are starting from the beginning. Host name and IP are the same. The question is… is it any way to tell dynatrace that this new host is the same that was available moment ago? Host is changing so processes has the same story.

Sebastian

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [January 15, 2019, 9:54am UTC](https://community.dynatrace.com/t/keeping-host-metrics-after-setting-it-up-again-aws/19103/2 "2019-01-15T09:54:19Z")

</div>

Can you preserve the configuration directory of oneagent? It includes the generated unique ID of the host. I think this is also related to MAC addresses of network interfaces. Are they also preserved?

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [January 15, 2019, 10:15am UTC](https://community.dynatrace.com/t/keeping-host-metrics-after-setting-it-up-again-aws/19103/3 "2019-01-15T10:15:57Z")

</div>

I think for now everything is being deleted to the ground and recreated so nothing is left after previous installation.

Sebastian

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [January 15, 2019, 12:43pm UTC](https://community.dynatrace.com/t/keeping-host-metrics-after-setting-it-up-again-aws/19103/4 "2019-01-15T12:43:34Z")

</div>

- When is the Oneagent installed?
- Is it a from scratch OS installation or some kind of VM image restore?
- Do the MAC addresses of network cards change between the individual lifecycles?
- Can you assure there will be no more than one instance of this VM?
- Can you somehow manage the lifecycle?

This is effectively an anti-pattern - as if the host gets really reinstalled - it is, in fact, a new host and should be treated accordingly.  
If it is the same image just restored to a snapshot - you have to convince the customer to include oneagent into the image or at least the configuration files.

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [January 15, 2019, 1:53pm UTC](https://community.dynatrace.com/t/keeping-host-metrics-after-setting-it-up-again-aws/19103/5 "2019-01-15T13:53:40Z")

</div>

Julius, general it is AWS, so host is killed and srarted from scratch. One agent is installed after setting up new instance (after application deployment) with the same IP and host name. I don’t know what with MAC Address. I don’t think it will be easy to put oneagent into host image because there is 5 or 6 host types that use the same os image I think. For now I’m checking options we have.

Sebastian

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [July 7, 2020, 6:48pm UTC](https://community.dynatrace.com/t/keeping-host-metrics-after-setting-it-up-again-aws/19103/6 "2020-07-07T18:48:35Z")

</div>

At this time I dont think thats possible. AS if the AWS instance is completely cleared, then all the config files will be gone as well, and the oneagent will deploy with a new GUID and hence you will see a new host (might have the same name, but the Dynatrace GUID is different) It might be a good idea to post a RFE for this is your organization needs this functionality.
