# How do you monitor Azure App Service for a Linux web app?

**URL:** <https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302>\
**Category:** Cloud platforms\
**Tags:** linux, services-classic, azure\
**Created:** [October 11, 2019, 2:59am UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302 "2019-10-11T02:59:48Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![bill\_scheuernst](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/bill_scheuernst/32/2211_2.png) [@bill\_scheuernst](https://community.dynatrace.com/u/bill_scheuernst)\
**Post date:** [October 11, 2019, 2:59am UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/1 "2019-10-11T02:59:48Z")

</div>

I am unable to install an extension for an Azure App Service running on Linux. Per the Dynatrace documentation, there isn’t an extension for this. How do you use Dynatrace for this type of App Service?

---

<div class="post-metadata">

**Author:** ![josh\_rogers](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@josh\_rogers](https://community.dynatrace.com/u/josh_rogers)\
**Post date:** [November 15, 2019, 8:21pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/2 "2019-11-15T20:21:21Z")

</div>

Is there not going to be an answer to this? We’re finding ourselves in the same position where we are unable to monitor these PaaS apps because we chose to deploy them to Linux.

---

<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:** [November 18, 2019, 7:41am UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/3 "2019-11-18T07:41:43Z")

</div>

> **[Microsoft Azure monitoring](https://docs.dynatrace.com/docs/observe/infrastructure-observability/cloud-platform-monitoring/azure-monitoring)**
>
> Monitor Azure with Dynatrace

As I understand, you don’t see available extension mentioned here for linux instances?

Sebastian

---

<div class="post-metadata">

**Author:** ![josh\_rogers](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@josh\_rogers](https://community.dynatrace.com/u/josh_rogers)\
**Post date:** [November 18, 2019, 2:19pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/4 "2019-11-18T14:19:40Z")

</div>

No, the extensions option is grayed out. You also can’t add extensions through Kudu.

 ![22484-1574086771971.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/f45d3177964294af61c8747392adf4824db0e841.png)

---

<div class="post-metadata">

**Author:** ![bill\_scheuernst](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/bill_scheuernst/32/2211_2.png) [@bill\_scheuernst](https://community.dynatrace.com/u/bill_scheuernst)\
**Post date:** [November 18, 2019, 3:20pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/5 "2019-11-18T15:20:24Z")

</div>

Extensions in general are not supported for App Services on Linux. However, there is a workaround which isn’t supported by Dynatrace. It is based on the runtime OA script for Kubernetes and Docker. The Azure App Service on Linux is essentially a Docker container. The Java image used is a “musl” type. I’ve created a basic script which will deploy OA under /home; this must be done in this directory as any changes outside of it will be lost when the container restarts.

---

<div class="post-metadata">

**Author:** ![josh\_rogers](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@josh\_rogers](https://community.dynatrace.com/u/josh_rogers)\
**Post date:** [November 18, 2019, 5:31pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/6 "2019-11-18T17:31:33Z")

</div>

I tried doing something like this, more as a test, but it couldn’t get access rights to the .Net dll so it wouldn’t report on the process itself just the container.

---

<div class="post-metadata">

**Author:** ![bill\_scheuernst](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/bill_scheuernst/32/2211_2.png) [@bill\_scheuernst](https://community.dynatrace.com/u/bill_scheuernst)\
**Post date:** [November 18, 2019, 5:44pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/7 "2019-11-18T17:44:57Z")

</div>

Is your app Java or .NET? We are using Java in ours and was able to deploy OA successfully to our PROD and TEST environments.

Also, In your application environment, you have to add "LD\_PRELOAD=\<\*/agent/lib64/liboneagentproc.so\> path

And then restart your application.

Let me know if you need/want to talk about this offline.

---

<div class="post-metadata">

**Author:** ![josh\_rogers](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@josh\_rogers](https://community.dynatrace.com/u/josh_rogers)\
**Post date:** [November 18, 2019, 5:57pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/8 "2019-11-18T17:57:39Z")

</div>

Our app is an [ASP.NET](http://ASP.NET) Core app. Thank you for your assistance thus far. I’ll continue to toy around with it and see if I can make any progress and if not I might just take you up on your offer.

Again, thank you!

---

<div class="post-metadata">

**Author:** ![CharlesWu](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@CharlesWu](https://community.dynatrace.com/u/CharlesWu)\
**Post date:** [March 23, 2020, 3:07pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/9 "2020-03-23T15:07:32Z")

</div>

Hi Josh - I have same requirement for [ASP.NET](https://answers.dynatrace.com//ASP.NET) Core app on Linux. Did yours work out?

---

<div class="post-metadata">

**Author:** ![juan\_antonio\_co](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@juan\_antonio\_co](https://community.dynatrace.com/u/juan_antonio_co)\
**Post date:** [September 23, 2020, 10:19am UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/10 "2020-09-23T10:19:10Z")

</div>

This is what has been provided by Dynatrace support. I tried a few times and it works quite well.

You would need to do the following steps:  
-) Set 3 environment variables via the Azure Portal  
-) Download and execute a script from us  
-) Set 1 environment variable via the Azure Portal  
-) Restart the WebApp

For this approach Dynatrace prepared a script which is comparable to our buildpacks:  
[https://github.com/DTMad/azure\_webapp\_linux/blob/master/dynatrace\_installer.sh](https://github.com/DTMad/azure_webapp_linux/blob/master/dynatrace_installer.sh)  
In this script do the following steps:

1. Download the agent
2. Install the agent
3. Set the standalone.conf file

Steps to do

The customer needs to set the following environment variables through the Azure Portal:

DT\_TENANT - only the tenant ID (skj22538), not the entire URL ([skj22538.live.dynatrace.com](http://skj22538.live.dynatrace.com))

DT\_API\_TOKEN – It needs to be a PaaS Token

DT\_API\_URL – needs to be the tenant URL followed by /api (ie [skj22538.live.dynatrace.com/api](http://skj22538.live.dynatrace.com/api))

Then the customer needs to ssh to his container and execute the following command:  
wget [https://raw.githubusercontent.com/DTMad/azure\_webapp\_linux/master/dynatrace\_installer.sh](https://raw.githubusercontent.com/DTMad/azure_webapp_linux/master/dynatrace_installer.sh) && bash dynatrace\_installer.sh  
This downloads the script mentioned above and runs it.  
After the agent installation is finished the customer then needs to set another environment variable via Azure Portal: ‘LD\_PRELOAD’

The value for variable ‘LD\_PRELOAD’ will be this path:

NOTE: Let’s make sure the path in LD\_PREDLOAD is correct, otherwise OneAgent will not load.

I hope this helps !  
 ![1600856247072.png](https://global.discourse-cdn.com/dynatrace/optimized/2X/0/05a251798bc42de22b9d9de35e9578ee5df94e2a_2_690x55.png)

---

<div class="post-metadata">

**Author:** ![CharlesWu](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@CharlesWu](https://community.dynatrace.com/u/CharlesWu)\
**Post date:** [September 23, 2020, 4:22pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/11 "2020-09-23T16:22:53Z")

</div>

Thanks for share the solution. This is to install OneAgent after a container is built. In other words, if the appservices are swapped to another image, then we lost the OneAgent. Wonder if this can be included in the dockerfile to install during the container build time.

---

<div class="post-metadata">

**Author:** ![CharlesWu](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@CharlesWu](https://community.dynatrace.com/u/CharlesWu)\
**Post date:** [November 18, 2020, 4:24pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/12 "2020-11-18T16:24:26Z")

</div>

Is Dynatrace going to find the solution for this or we have to tell our customers to use the Native tool instead of Dynatrace?

---

<div class="post-metadata">

**Author:** ![francois\_jouber](https://avatars.discourse-cdn.com/v4/letter/f/a9a28c/32.png) [@francois\_jouber](https://community.dynatrace.com/u/francois_jouber)\
**Post date:** [March 11, 2021, 6:54am UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/13 "2021-03-11T06:54:10Z")

</div>

Hi Juan,

The GitHub link to the installer script doesn’t seem to work - It has probably been removed. Do you know where I can find it?

Francois

---

<div class="post-metadata">

**Author:** ![luis\_mpa](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@luis\_mpa](https://community.dynatrace.com/u/luis_mpa)\
**Post date:** [March 17, 2021, 8:10am UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/14 "2021-03-17T08:10:56Z")

</div>

Hi [@bill\_scheuernst](https://community.dynatrace.com/user/8813)&nbsp;. I’m not able to install it in non-containerized Linux AppServices solutions. It seems that for Linux AppServices, it is only possible for containers. --\>

> **[Integrate OneAgent on Azure App Service for Linux and containers](https://docs.dynatrace.com/docs/ingest-from/microsoft-azure-services/integrations/azure-appservice/integrate-oneagent-on-web-app-for-containers)**
>
> Learn how to install, configure, update, and uninstall OneAgent in containerized applications on Linux.

I opened an idea the past 16th February → [https://community.dynatrace.com/t5/Dynatrace-product-ideas/App-Services-for-NON-CONTAINERIZED-Web-Apps-in-Linux/idi-p/139301](https://community.dynatrace.com/post/139301)

---

<div class="post-metadata">

**Author:** ![ondrej\_dolezal1](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@ondrej\_dolezal1](https://community.dynatrace.com/u/ondrej_dolezal1)\
**Post date:** [October 4, 2021, 2:28pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/15 "2021-10-04T14:28:19Z")

</div>

Hi Bill, it is possible to talk about Azure Linux WebApp OA deploy? We are facing with some issues with deploys, so I would be happy for some tips.

Thanks!

Ondrej

---

<div class="post-metadata">

**Author:** ![lee\_rovner](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@lee\_rovner](https://community.dynatrace.com/u/lee_rovner)\
**Post date:** [October 4, 2021, 5:56pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/16 "2021-10-04T17:56:52Z")

</div>

> **[Integrate OneAgent on Azure App Service for Linux and containers](https://docs.dynatrace.com/docs/ingest-from/microsoft-azure-services/integrations/azure-appservice/integrate-oneagent-on-web-app-for-containers)**
>
> Learn how to install, configure, update, and uninstall OneAgent in containerized applications on Linux.

---

<div class="post-metadata">

**Author:** ![kboadi](https://avatars.discourse-cdn.com/v4/letter/k/c2a13f/32.png) [@kboadi](https://community.dynatrace.com/u/kboadi)\
**Post date:** [August 2, 2022, 6:01pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/17 "2022-08-02T18:01:33Z")

</div>

Hello Bill,

Can you share with me the script you deploy?

Kofi

---

<div class="post-metadata">

**Author:** ![Tom\_Eaton](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tom_eaton/32/27852_2.png) [@Tom\_Eaton](https://community.dynatrace.com/u/Tom_Eaton)\
**Post date:** [September 13, 2023, 2:06pm UTC](https://community.dynatrace.com/t/how-do-you-monitor-azure-app-service-for-a-linux-web-app/22302/18 "2023-09-13T14:06:47Z")

</div>

In the last year, i have had clients follow the documentation for linux in Azure and it worked perfectly for Azure app services.
