Azure Datadog eu infra - azure

I was genuinely interested into deploying datados as a MaaS from the azure marketplace, and I did so just to try how it works. The configuration was extremely easy and I was able to see all the metrics and infrastructure and the logs of all my infra.
But the fact that my data leaves EU to get to US, I didn't like it too much. So I was reading that Datadog has a EU infra but you require to have a vm and install the host there.
So I did follow the official documentation and configured:
Azure Windows VM
Download and installed the agent
Once the agent was installed, I configured azure integration
Created the app registration
Set the role to Monitor reader
Configured the app service principle in the azure integration in Datadog.
Everything worked just as expected, but when I try to access the logs blade in the left hand side, I don't see any log but instead a initial configuration that needs to be done, like:
Server
Container
Cloud
Client
Other
Can please anyone help to understand what I am doing wrong here?
If I want to ingest all the logs from my monitoring (which I have already the permissions set) do I really need to create the event grid, azure function as mentioned under the Cloud section?
I though that the monitoring service principle was more than enough to ingest all the data.
Just out of curiosity, under logs => Server I tried to follow the configurations for .net and enable the logs
logs_enabled: true
site: datadoghq.eu
and set the sharp Configuration file. but nothing, after restarting the service, I am still unable to receive any log from my subscription.
If anyone can help understand what I am doing wrong here, I would be really grateful.
Please if yo need any extra info, just let me know

Related

Azure Web App with Linux Logging not works

i try my first steps with Azure. I have upload a WebApp (Blazor WASM Serverhosted) on a Linux System. Now i want to see the logs. My application brokes on Azure on startup. Everything I have tried has not worked.
The logstream shows nothing.
The Monitoring/logs are disabled
I activate in Monitoring/App Service Logs the File System and go to FTP Folder and i don't find a log-folder or something like this
I hope for help to fix my App or Configuration on Azure
Still the issue can be available in github . You can achieve this by using below steps.
Steps provided here. And I am deployed in Linux app service
Now you can be able to view the logs in application insights
You can add/modify the custom logs as well by using the custom telemetry client.
Refer here for detailed information

How to enable logging in new Azure VMs, automatically?

I have created a custom OS images on Azure containing my app, omsagent, and a configuration file to track my application logs. I verified that the custom logs were available on Log Analytics Workspace for that VM.
When I create a new VM with this custom OS, using Python SDK, I don't receive logs in the workspace. I verified that omsagent is working. It is sending heartbeats that are visible on the Log Analytics Workspace > Insights > Agents.
I found out that the new is was not Connected to the workspace.
So my question is how do I automatically connect a VM to Log Analytics Workspace at creation time?
I would advise against baking the Log Analytics Agent (OMS Agent) into the image directly - Azure doesn't recommend this kind of setup. Instead, you should be using an Azure Policy that they provide exactly for this scenario.
We have dozens of VMs and Scale Sets we need to manage with Log Analytics Agent installed on each of them when we build the custom images. In the beginning everything was working fine but a couple of months later those images stopped working.
After spending some time investigating with the Azure team we found out that the agent's certificate wasn't being renewed and it wouldn't connect to the Workspace automatically. Even worse was that because of this, it was failing all our images builds.
We were told that this is not the right practice and we should look at Azure Policies. They are rather easy to setup - just assign once and forget about them. It's also good for compliance and will let you know if there's any machine that's non-compliant.
Check this link for more info about Azure Monitor policies.
And this link will open your Azure Portal directly into the policies page for Windows VMs.
Here's a preview of the policies available:

Azure Deploy: No Worker assigned to App Service Plan. Site Cannot Serve any requests. How To?

I'm trying to deploy my solution to Azure so my website can be accessed through the Internet.
When I deploy, Azure DevOps tells me Release/Deploy succeeds, but when I open the azurewebsties.net-URL, I get a 404.
After running some diagnostics, it tells me:
Currently no worker is assigned to the app service plan. The site cannot serve any requests.
When I research on how to Add a worker I find this link
https://learn.microsoft.com/en-us/azure-stack/operator/azure-stack-app-service-add-worker-roles?view=azs-2008&tabs=azurerm
But when I try and follow it, my azure interface is too different from theirs, and things don't add up. It says:
Azure App Service on Azure Stack Hub supports free and shared worker tiers by default.
I don't see any worker tiers at all, the tutorial-mentioned tab Roles, deals with userPermissions.
JSON resource seem to show there are no workers indeed.
But diagnostics also says following information is logged by... a worker.
Though I cannot exclude problems elsewhere for a 100%, It really seems to be a worker-problem.
Build- & ReleasePipeline succeed, Artifact get uploaded & deployed, Authentication & KeyVault is good, I get Request&Response Activity in AzurePortal-Graphs. But no website.
So my questions are:
What are these workers, what do they do high-level? Operate like some kind of ServiceBus between WebApp & Azure? What language/format are they in?
How and where can I add one? Is it in code (angular/c#), JSON or in azure portal?
Where can I find up to date documentation
Anybody know how to tackle this?
Thanks in advance!

I have an API deployed to an Azure VM. I'd like to send all console output from this API to some cloud text storage for reading How do I do this?

As per the title, I just want all stdio output from this service to be sent to a cloud resource like cloudwatch logs or Azure Monitor so I can just read them in a time span. All stdio lines should be there.
The documentation for this seems nonexistent
This really depends on what tech that API is built on and what OS your VM is hosting. But the simplest way is IMO to enable the monitoring agent on your VM. Create a Log Analytics workspace and attach your VM straight from the portal. This way you can subscribe to different sources of logs and make them appear in your LA workspace, to be queried and filtered for further analysis.
Docs here: https://learn.microsoft.com/en-us/azure/azure-monitor/learn/quick-collect-azurevm
You output from your API can then within the VM be directed to either Windows EventLog or Linux syslog, which is supported out of the box in Log Analytics workspace and the monitoring agent. If your API runs in a container, say with docker, you can enable a special container monitoring solution on your created LA workspace - or you can configure docker to direct container logs to either syslog or EventLog directly.
If you run docker containers, here's a guide for configuring the logging driver: https://docs.docker.com/config/containers/logging/syslog/
If you run you API on IIS, you can simply enable IIS logs fetching on your LA workspace from the portal. However, this will only send HTTP logs and not stdout as far as I know.
If Anything else, please enhance your question.

Azure: Deploying a Ruby on Rails app in the Cloud

I've just completed an automation script that:
downloads a project build to local storage (worker role)
installs ruby, apache, and other dependencies
configures apache and the RoR application to serve requests via port 81
This is all working locally. I'm working with visual studio; running the application successfully pulls the local machine from "blank slate" to "serving requests".
I'm now trying to push this up to Azure - no longer using the local machine, but an actual worker role.
I've packaged the project and uploaded it to a production environment via my Azure subscription portal, but navigating to the site URL doesn't give me anything (site not found).
I'm a bit new to Azure. What steps do I need to take to ensure that this application will work up in the cloud? I feel like I've forgotten to configure something, like the endpoint port (81). Any advice or recommended reading would be super helpful; thank you so much for your time!
If you need some real assistance to troubleshoot the problem, tt would be best to see the following 3 things:
Your automation script (Startup Task)
Your worker role OnStart() function
Your ServiceDefinition and ServieConfiguration
Are you using ProgramEntryPoint to luanch your RoR app or you are doing all of this in Startup task? Based on above info, it is easy to understand the application architecture and some suggestions can be made.
However, the best way to troubleshoot this problem is to enabled RDP access to your Azure Worker Role VM and then Log into your Azure VM to understand what is going on. RDP access to Azure VM will validate that your install script ran correctly and all the modules were started.
As your are new to Windows Azure there could be several things could be missing and if you provide more info you will get accurate help instead of some guess work.

Resources