Grafana Alert/AzureMonitor: Getting execution error while creating alert rules for graph in Grafana - azure

Description:
I'm trying to create alert rule for graph(old) in grafana, but getting execution error.
Grafana Configuration:
Data Sources: Azure Monitor
Dashboard: AKS Monitor Container
Grafana hosted in Azure as Docker Container
Notification Channel: Microsoft Teams
Alert Rule Config:
Error:
Working State:
Configured notification channel(Type: Teams) is triggering perfectly.
Grafana is working perfectly
Tried Scenarios:
Deleted and recreated the whole Grafana Resource group in which a WebApps resource is there which is running Grafana dokcer image.
Tried with adding grafana from Azure Marketplace.
Searched a lot in google about this error but no luck.
Checked multiple times the config of notification Channel, Grafana(in Azure portal), Alert rule.
So, if anyone know about this error, please let me know the solution.
(OR)
I missed some configuration for Alert/Notification. If it is, Let me know.
Thanks in advance!!

Well, i got the answer for this.
As per Grafana, it will not allow you to create an Alert rule, if you are using(or referring) any variable in query.
Also, I created an issue in github and it's resolved. the fix can be seen in grafana 8.3.0

Related

Microsoft Azure AD Connect Provisioning Agent error 5

I am getting this error. How I going to solve this. Some configurations are disabled and inactive. Please help me. Thank you.
Also when connecting the Microsoft Azure Active Directory Connect Provisioning Agent Configuration. Its say that error. Please see images.
Provisioning Agent cloud sync keeps track of the condition of your configuration and quarantines any unhealthy components. Whenever calls sent to the target system continually fail on invalid credentials.
To resolve this issue:
You can clear the quarantine and restart the provisioning job like below:
You can view additional details regarding the quarantine by selecting the status and the error code message also will display.
To restart provisioning job, click on your domain -> edit cloud sync configuration and -> Restart sync.
we encountered an unexpected error when registering the agent please try again
When you deploy the cloud provisioning agent, you may receive an error message. Generally, the agent's unable to implement the PowerShell registration scripts is what causes this issue.
Try to change PowerShell execution policies make sure local machine and user policy should be RemoteSigned or Undefined
If still error persists you can repair the cloud sync service account using below cmd:
Install AADCloudSyncTool Connect-AADCloudSyncTools , Enter credentials
Run Repair-AADCloudSyncToolsAccount
Reference:
Azure AD Cloud Sync Highlights and Deployment (misconfig.io)

Azure Datadog eu infra

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

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!

Azure Docker Web App - Failed to update data for container settings

I'm trying to configure continuous deployment for my Web App in Azure so it deploys every time I push an updated container image to the Azure registry.
However, when I go to "Container Settings" and set "Continuous Deployment" to true and then hit save I get the following error:
"Failed to update data for container settings."
I'm not sure how to start debugging this error message to find out what the issue is.
Does anyone have any ideas?
I faced the same error message when trying to update the configuration of a multi-container app.
The Azure portal sends the update as a request to their management API and the JSON response to this request contains a more detailed error message. This might help with debugging. For example, in my case the configuration was too long and this was kind of communicated in the response that I was able to find through the network tab of my browsers developer tools.
This just worked after revisiting the portal after a couple of days. Must have needed a bit of bedding in...

Resources