we write custom logs to appinsights (Structured logging)
Question:
Is there a way to include the all log statements in the email that gets generated via azure custom log alerts ?
or is a webhook/PS script required ?
Thanks -nen
You can use azure logic app services which are useful for automating workflows that connect your apps, data, services, and systems.
Im try to fetch all the log statements from appinsights using Visualize Analytics query or Run Analytics query action of Azure Application Insights Connector just by adding Connection name, Application Id and API Key.
In the next step you can add Send an email (V2) action of Office 365 Outlook connector and send all the log statements in the email.
Below is the flow of my logic app
RESULTS:
In my Inbox
You can also refer to the tutorial from Automate Azure Application Insights processes by using Logic Apps
REFERENCES:
Overview for Azure Logic Apps
Azure Application Insights
Related
If I look at the Azure activity logs in Azure Portal some of the logs are initiated by Microsoft internal services like "Microsoft Azure Policy Insights". In my application we are getting the Azure activity logs using the Rest API for Activity logs. Is there a way to filter out internally generated logs (initiated by Microsoft Services) from the ones generated by actual users or applications configured in the account? I thought of using caller as a way to differentiate. For users caller has an email address assigned. But the problem with this approach is this approach will filter out any logs for applications as well. Let me if there is any other way to achieve this.
Unfortunately I don't believe there is a way to achieve this scenario.
In Azure is it possible to create an alert, with a webhook, if any of my resource goes up or down(not service, but resource)? I see many alert conditions but none of them do plain up/down monitoring.
Is it possible to create these alerts (with a webhook) programatically using REST API(without logging into Azure portal), once i get the required authorization? Currently I am unable to find any create alert REST API
Thanks.
Ok, I found out how to do this.
The REST API provided by Azure for monitoring can be used to create new Action Groups and create new Alerts.
The document here gives more details: https://learn.microsoft.com/en-us/rest/api/monitor/actiongroups
https://learn.microsoft.com/en-us/rest/api/monitor/alertrules/createorupdate
I am new to Azure and have been going through various tutorials.
I am looking specifically at Azure Monitoring using REST APIs.
What I am trying to do is get the status of various resources like Virtual Networks, AD, Load Balancers etc on a custom dashboard using REST APIs.
I have found some list of REST APIs that allow monitoring here(https://learn.microsoft.com/en-us/rest/api/monitor/)
But do they provide Resource health and Status.Also, do i have a create a new Service API Managament Resource(which is a paid resource) in the Azure Account for these APIs to run?.
Please let me know if you have any insights or reference materials on this
I don't think rest API is good for monitoring. I will suggest use Azure Monitor service under that you can use Azure resource metrics, Activity logs and service health. based on these metrics and logs you can set alert and show live data on the dashboard.
We are using Microsoft OMS for live monitoring (visualization of data) and Email/SMS for notification.
List item
Audit and receive notifications about important actions in your Azure subscription
I know Application insights can use to monitor the Web applications on azure platform. We just need to setup the Instrumentation id and account id.
But my requirement is to send the simulated data to Azure Application insights directly and show the graphs on dashboard. Is there any way to do this.
Java sdk to send the simulated data onto Application insights.
https://github.com/Microsoft/ApplicationInsights-Java/tree/master/samples/src/main/java/com/microsoft/applicationinsights/sample
I want to send daily email with my application.
Background
My application has web.api which created .net core & published on Azure app api (Paas).
API has it's own authentication mechanism(JWT token) & it's used dependancy injection. It read configuration value ex. Database, Redis cache, bob storage connection string from Azure key vault
Solution
1)If i create new console application and set in web job. I have to do lot of coding for dependnecy injection and have to integrate azure valut.
2)Can i create web api in current api project but how to ensure security only azure web job can call api.
same question ::Securely calling a WebSite hosted Web API from an Azure WebJob
As you mentioned that we could use the Azure scheduled WebJob to send daily mail. Send mail demo code please refer to another SO thread.
Can i create web api in current api project but how to ensure security only azure web job can call api.
We need to use our authentication way to security our WebApi. And Azure also supply multiple ways to help us protect our WebApp. We can get more info about
Authentication and authorization for API Apps in Azure App Service from document.