# Unable to Monitor services in Docker Image GO

**URL:** <https://community.dynatrace.com/t/unable-to-monitor-services-in-docker-image-go/37670>\
**Category:** Container platforms\
**Tags:** golang, docker\
**Created:** [December 13, 2022, 4:49am UTC](https://community.dynatrace.com/t/unable-to-monitor-services-in-docker-image-go/37670 "2022-12-13T04:49:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgarzon1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rgarzon1/32/11844_2.png) [@rgarzon1](https://community.dynatrace.com/u/rgarzon1)\
**Post date:** [December 13, 2022, 4:49am UTC](https://community.dynatrace.com/t/unable-to-monitor-services-in-docker-image-go/37670/1 "2022-12-13T04:49:06Z")

</div>

Hi

in a fresh Ubuntu 22 with docker installed.

I am trying to&nbsp; monitor this example in order to validate this documentation

> **[Known limitations for Go support](https://docs.dynatrace.com/docs/ingest-from/technology-support/application-software/go/support/go-known-limitations)**
>
> Learn the limitations for Go support and their workarounds.

But i am facing some problems. even after reboot the machine, restart the docker, delete the image. i was unable to achieve the monitoring of the image. i know that its monitoring the&nbsp; process but its not&nbsp; monitoring the services.

SO:&nbsp;Ubuntu 22.04.1 LTS

Docker:&nbsp;Docker version 20.10.21, build baeda1f

OneAgent version:&nbsp;1.255.174.20221209-095004

 ![rgarzon1_0-1670906898404.png](https://global.discourse-cdn.com/dynatrace/original/2X/8/8e8b60c101885118d95d8cdb8dfc40de385be685.png)

**Do anyone have a valid working example of a api (with the services detected) build in Go that its working with dynatrace ? like in the demo,**

i try some of us that we are using without success, i try this

[https://github.com/crizstian/golang-api-example](https://github.com/crizstian/golang-api-example)

[https://github.com/wdrdres3qew5ts21/Example-Golang-REST-API-with-Docker](https://github.com/wdrdres3qew5ts21/Example-Golang-REST-API-with-Docker)

our last hope to monitor go image was the example 7 and is not working neither.

Logs:&nbsp;&nbsp;[Pastebin.com - Locked Paste](https://pastebin.com/fSbmFy1x)

Pas: GjNxjTYAL2

any advice would be appreciated

Thank you In advance

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [December 14, 2022, 11:17am UTC](https://community.dynatrace.com/t/unable-to-monitor-services-in-docker-image-go/37670/2 "2022-12-14T11:17:41Z")

</div>

There are a few limitations with go Monitoring, be sure to check out [the documentation](https://www.dynatrace.com/support/help/technology-support/application-software/go/support/go-known-limitations).

---

<div class="post-metadata">

**Author:** ![rgarzon1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rgarzon1/32/11844_2.png) [@rgarzon1](https://community.dynatrace.com/u/rgarzon1)\
**Post date:** [January 3, 2023, 9:47am UTC](https://community.dynatrace.com/t/unable-to-monitor-services-in-docker-image-go/37670/3 "2023-01-03T09:47:07Z")

</div>

Thank you pahofmann

as i said, i just validated all and the app comply with all of them. even i am using a example from google that works if the oneagent its running on the server, but its not working if i am trying to monitor only the image.

the last logs i am getting show me some hints but i cant understand why it stops

 ![rgarzon1_1-1672740179062.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/f/afb9335e8e3bd3d04eee103a322dd0aad545af9f.png)

========= Agent state DISABLED has changed to true. Current agent.state: MANUALLY\_STOPPED ===================  
[native] SensorBase: Sensor ‘Go.ClientWebRequest’: agent initialization unsuccessful

but as i said. i am not getting any advance. our intention its to find a configuration that the agent can work. because in the demo there is a api in docker with go working with the agent&nbsp;  
[ruxitagent\_server\_1.0.log](https://community.dynatrace.com/uploads/short-url/gtYKtwiPxC7XwaXHbCtbSi23H0p.log) (30.2 KB)

---

<div class="post-metadata">

**Author:** ![rgarzon1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rgarzon1/32/11844_2.png) [@rgarzon1](https://community.dynatrace.com/u/rgarzon1)\
**Post date:** [January 10, 2023, 3:24pm UTC](https://community.dynatrace.com/t/unable-to-monitor-services-in-docker-image-go/37670/4 "2023-01-10T15:24:40Z")

</div>

Does anyone have a template of a Docker image of a api build in go ?&nbsp; that dynatrace can monitor ?

---

<div class="post-metadata">

**Author:** ![bhantol](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@bhantol](https://community.dynatrace.com/u/bhantol)\
**Post date:** [November 26, 2024, 9:01pm UTC](https://community.dynatrace.com/t/unable-to-monitor-services-in-docker-image-go/37670/5 "2024-11-26T21:01:54Z")

</div>

I would like to see this working as well. In my case I can’t understand why oneagent-pass Go Agent gets Inactivated. We have disabled Go monitoring but we do enable it using dt\_agent\_type\_overide=‘go=on’

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [November 27, 2024, 8:00am UTC](https://community.dynatrace.com/t/unable-to-monitor-services-in-docker-image-go/37670/6 "2024-11-27T08:00:14Z")

</div>

Hello&nbsp;[@rgarzon1](https://community.dynatrace.com/user/51579)

Regarding the highlighted point PFA resources for review:

- [Enable Go monitoring — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/technology-support/application-software/go/configuration-and-analysis/enable-go-monitoring)
- [Define custom services — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/technology-support/application-software/go/configuration-and-analysis/custom-go-services)
- [GitHub - Dynatrace/OneAgent-SDK-for-Go · GitHub](https://github.com/Dynatrace/OneAgent-SDK-for-Go)
- [Go — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/technology-support/application-software/go)

BR,

Peter

---

<div class="post-metadata">

**Author:** ![rgarzon1](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rgarzon1/32/11844_2.png) [@rgarzon1](https://community.dynatrace.com/u/rgarzon1)\
**Post date:** [November 27, 2024, 2:19pm UTC](https://community.dynatrace.com/t/unable-to-monitor-services-in-docker-image-go/37670/7 "2024-11-27T14:19:45Z")

</div>

Hi&nbsp; [@Peter\_Youssef](https://community.dynatrace.com/user/51369)

This issue dates back about two years. From what I recall, it was related to running the OneAgent in a virtual machine (VM) where the monitoring was disabled. If I attempted to monitor the same image with monitoring enabled (only for the image), the OneAgent inside the image would stop functioning.

In such cases, there are typically two options:

Use a clean VM without OneAgent installed.  
Use a VM with OneAgent installed but ensure that monitoring is enabled.  
The problem I faced at the time was due to forgetting that the OneAgent was already installed and active inside the VM.

I hope this helps clarify the situation. and thank you for your response.
