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
Related
Is it possible to reproduce the steps to "Configure Azure AD Connect cloud sync" from the Azure portal, in another way using an API?
The steps are described at this link:
https://learn.microsoft.com/en-us/azure/active-directory/cloud-sync/tutorial-single-forest#configure-azure-ad-connect-cloud-sync
I would like to automate this process to have no user interaction. Is it possible with the Graph API? Any example?
Thank you Marilee Turscak - MSFT for providing the reference Link.
I don't understand this sentence: "You need to use this application
ID 1a4721b3-e57f-4451-ae87-ef078703ec94. The displayName is the AD
domain url, if used in the portal (for example, contoso.com), but it
may be named something else." What is the application id I should use?
And what is the display name? I get 401 or 403 errors. Is there an
additional step before this?
You have to use the same application ID as its the Application templateID by default which is used to provision entries from active directory to Azure active directory.
But You can use any Display name that you want and Please make sure to have the required permissions as shown below. You can perform the post operation with Graph explorer.
After you have done the above post operation you will get the service principal ID which can be used for further steps mentioned in the document provided by Marilee Turscak - MSFT.
Reference:
How to programmatically configure cloud sync using MS Graph API | Microsoft Docs
I am looking for a way to send a custom HTTP POST on service hook action. Kind of like the default WebHook functionality but with a customised body.
Is there a way to link a custom action to the consumer event?
You can add some proxy like azure function that will reformat your message and if need call Azure DevOps rest api and also get more information, and after reformatting message you send it to final consumer. You can use logic app also for that.
You can use azure logic app as suggested by #Janusz Nowak to send a custom http post on the event in azure devops.
You can check out Quickstart: Create your first workflow by using Azure Logic Apps - Azure portal.
After the logic app is created in your azure portal. In the Logic app designer page choose the Blank Logic App in templates.
In the search box type in azure devops and select a trigger event in azure devops.
Then you will be prompted to authorize the logic app to connect to your azure devops.
When you complete configuring your organization and project in the event trigger. Click ** + New Step** to add a HTTP action
You can customize your Http Request in the Http action.
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.
I would like to create multiple knowledge bases using https://www.qnamaker.ai. On the UI when I create a new qnamaker service using my azure subscription it actually creates 3 things/services for 1 qnamaker which are as follows
qnamaker as Cognitive service
Azure app service to provision qnamaker
Azure Search service to power qnamaker search
Based on the documentation it makes sense to have this created. But, I would like to see if it's possible to combine all qnamaker's on one single strong , highly scaled azure app service. ?
You are able to create multiple knowledgebases on one Azure app service.
The only thing you would need to change if using APIs is the knowledgebase ID while the subscription key would remain the same.
You can either create new knowledgebases using its API here https://learn.microsoft.com/en-us/azure/cognitive-services/qnamaker/quickstarts/create-new-kb-csharp
Or log into their QnA Portal https://www.qnamaker.ai/ into my knowledgebases, creating a new one and adding in the HTTP Request info to the API method. https://learn.microsoft.com/en-us/azure/cognitive-services/qnamaker/how-to/metadata-generateanswer-usage
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