# Does Re-enablement of OneAgent monitoring needs applicatioin service restart to enable code-level monitoring?

**URL:** <https://community.dynatrace.com/t/does-re-enablement-of-oneagent-monitoring-needs-applicatioin-service-restart-to-enable-code-level-monitoring/15164>\
**Category:** Dynatrace Managed\
**Tags:** dynatrace-managed, oneagent\
**Created:** [August 30, 2018, 2:27am UTC](https://community.dynatrace.com/t/does-re-enablement-of-oneagent-monitoring-needs-applicatioin-service-restart-to-enable-code-level-monitoring/15164 "2018-08-30T02:27:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![waikeat\_chan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/waikeat_chan/32/33405_2.png) [@waikeat\_chan](https://community.dynatrace.com/u/waikeat_chan)\
**Post date:** [August 30, 2018, 2:27am UTC](https://community.dynatrace.com/t/does-re-enablement-of-oneagent-monitoring-needs-applicatioin-service-restart-to-enable-code-level-monitoring/15164/1 "2018-08-30T02:27:36Z")

</div>

Hi community member,

Asking this question 'cause there is no good and safe place to let me try this out.

If previously a monitoring with code-level already enabled, and then I disabled it. After that when I enabled it back, would I still get back the code-level visibility? or restarts are required? Or it depends on how long the monitoring is disabled?

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [August 30, 2018, 3:54pm UTC](https://community.dynatrace.com/t/does-re-enablement-of-oneagent-monitoring-needs-applicatioin-service-restart-to-enable-code-level-monitoring/15164/2 "2018-08-30T15:54:19Z")

</div>

Any time you’re remove or adding code level monitoring a restart is required for that change to fully go into affect. After disabling monitoring you might immediately stop seeing code level data in Dynatrace but in order for the actual instrumentation to be removed from the code a restart is required.

James

---

<div class="post-metadata">

**Author:** ![waikeat\_chan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/waikeat_chan/32/33405_2.png) [@waikeat\_chan](https://community.dynatrace.com/u/waikeat_chan)\
**Post date:** [September 2, 2018, 6:46am UTC](https://community.dynatrace.com/t/does-re-enablement-of-oneagent-monitoring-needs-applicatioin-service-restart-to-enable-code-level-monitoring/15164/3 "2018-09-02T06:46:44Z")

</div>

James,

So is my understanding correct?

 ![18136-myunderstanding.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/4/54ce9d5db052279c2222ee2abf36dca3c5e31bf0.png)

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [September 4, 2018, 4:52pm UTC](https://community.dynatrace.com/t/does-re-enablement-of-oneagent-monitoring-needs-applicatioin-service-restart-to-enable-code-level-monitoring/15164/4 "2018-09-04T16:52:02Z")

</div>

The top looks right. Would have to try the bottom to know for sure - I expect the instrumentation is still at the code level but don’t know if for instance we don’t display it again until the app is restarted. I don’t see any reason why we would do that but have never tried it so can’t say for sure.

---

<div class="post-metadata">

**Author:** ![waikeat\_chan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/waikeat_chan/32/33405_2.png) [@waikeat\_chan](https://community.dynatrace.com/u/waikeat_chan)\
**Post date:** [January 25, 2019, 10:37am UTC](https://community.dynatrace.com/t/does-re-enablement-of-oneagent-monitoring-needs-applicatioin-service-restart-to-enable-code-level-monitoring/15164/5 "2019-01-25T10:37:37Z")

</div>

It has been a while, does any community member or dynatrace staff happens to come across this or try this by chance?

---

<div class="post-metadata">

**Author:** ![Don\_Meuth](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@Don\_Meuth](https://community.dynatrace.com/u/Don_Meuth)\
**Post date:** [May 8, 2019, 6:25pm UTC](https://community.dynatrace.com/t/does-re-enablement-of-oneagent-monitoring-needs-applicatioin-service-restart-to-enable-code-level-monitoring/15164/6 "2019-05-08T18:25:54Z")

</div>

If you are speaking of turning on/off the “Monitor this host” option in Host Setting. it does not require a restart of the application, as OneAgent is running. It is just not having its statistics gathered at the Dynatrace Server. I have done this several times, and as long as you don’t actually Stop the agent, it causes not issues
