cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

bill_scheuernst
DynaMight
DynaMight

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?

 

Dynatrace Certified Professional
17 REPLIES 17

josh_rogers
Newcomer

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.


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

skrystosik
DynaMight Guru
DynaMight Guru

https://www.dynatrace.com/support/help/technology-support/cloud-platforms/microsoft-azure/azure-serv...

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

Sebastian


Regards, Sebastian

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


bill_scheuernst
DynaMight
DynaMight

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.


Dynatrace Certified Professional

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.


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.


Dynatrace Certified Professional

Our app is an 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!


Hi Josh - I have same requirement for ASP.NET Core app on Linux. Did yours work out?

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

Hello Bill,

Can you share with me the script you deploy?

Kofi

juan_antonio_co
Participant

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
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)

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)


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 && 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 !

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.

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

luis_mpa
Helper

Hi @bill_scheuernst . 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. --> 

https://www.dynatrace.com/support/help/technology-support/cloud-platforms/microsoft-azure-services/o... 

 

I opened an idea the past 16th February -> https://community.dynatrace.com/t5/Dynatrace-product-ideas/App-Services-for-NON-CONTAINERIZED-Web-Ap... 

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

Featured Posts