Azure VM monitoring default health criteria alert notification - performance

New to Azure, Just wanted to understand if it possible to get a notification like email, slack message or a webhook push, when the default VM health criteria is breached (e.g. when Disk Avg. Disk sec/Read).
Below link says All health criteria are pre-configured to alert when the unhealthy condition is met.
https://learn.microsoft.com/en-us/azure/azure-monitor/insights/vminsights-health#alerting-and-alert-management
But how to configure the action group/ external notification.
I tried a solution mentioned in below link which tells to enable default notificationSettings, but no luck in getting the slack / email.
https://azure.microsoft.com/en-us/blog/understanding-health-criteria-in-azure-monitor-for-vms/
{
"nextLink": null,
"value": [
{
"etag": null,
"id": "/subscriptions/SUB_ID/resourcegroups/RG/providers/Microsoft.Compute/virtualMachines/SonarQube/providers/Microsoft.WorkloadMonitor/notificationSettings/default",
"name": "notificationSettings/default",
"properties": {
"actionGroupResourceIds": [
"/subscriptions/SUB_ID/resourceGroups/RG/providers/microsoft.insights/actionGroups/Webhook_gateway",
"/subscriptions/SUB_ID/resourceGroups/RG/providers/microsoft.insights/actionGroups/Slack%20Webhook",
"/subscriptions/SUB_ID/resourceGroups/RG/providers/microsoft.insights/actionGroups/VM%20monitoring"
]
},
"type": "Microsoft.WorkloadMonitor/virtualMachines/notificationSettings"
}
]
}

Classic metric alerts in Azure Monitor provide a way to get notified when one of your metrics cross a threshold.
Using this, you can send notifications to your email addresses as well as call a webhook when the alert fires.
Refer to these docs:
Create, view, and manage classic metric alerts using Azure Monitor
Have a classic metric alert notify a non-Azure system using a webhook

Related

How do I list google google business profile locations from an account ID using google business profile API without getting a 429?

I have been approved for the google business profile api after folliwing the prerequisites and gaining approval for access found here. Continuing, per the instructions in the project in the google business cloud dashboard I have added the following API's:
Google My Business API PRIVATE
My Business Account Management API
My Business Business Calls API
My Business Business Information API
My Business Lodging API
My Business Notifications API
My Business Place Actions API
My Business Q&A API
My Business Verifications API
Continuing per the instructions found here for basic set up, I am able to get to the point when I can get the Account ID of the person authorized in the Google api playground.
With the exception of search functionality, when trying to do anything related to the scope of businessbusinessinformation.googleapis.com all my requests return a 429. For example, the following request:
https://mybusinessbusinessinformation.googleapis.com/v1/accounts/1023160XXXXX/locations
{
"error": {
"status": "RESOURCE_EXHAUSTED",
"message": "Quota exceeded for quota metric 'Requests' and limit 'Requests per minute' of service 'mybusinessbusinessinformation.googleapis.com' for consumer 'project_number:40740XXXXXX'.",
"code": 429,
"details": [
{
"reason": "RATE_LIMIT_EXCEEDED",
"#type": "type.googleapis.com/google.rpc.ErrorInfo",
"domain": "googleapis.com",
"metadata": {
"service": "mybusinessbusinessinformation.googleapis.com",
"quota_limit": "DefaultRequestsPerMinutePerProject",
"quota_location": "global",
"quota_metric": "mybusinessbusinessinformation.googleapis.com/default_requests",
"quota_limit_value": "0",
"consumer": "projects/40740XXXXXXX"
}
},
{
"#type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"url": "https://cloud.google.com/docs/quota#requesting_higher_quota",
"description": "Request a higher quota limit."
}
]
}
]
}
}
Reviewing all the visible quotas related to the API I can't find any that say 0. I have filled out a general form for quoata increase as I can see nowhere in the dashboard where I can directly see the DefaultRequestsPerMinutePerProject setting to request a quota increase.
Since originally writing this a few days ago, I made a quota request increase via the google form, but I am not sure if that will address anything as it seems strange this would not be working "out of the box" after receiving approval prior for this api.
Any suggestions would be great!
After contacting google api support, the 429 went away, there is nothing else that was done to resolve this issue.
I am unsure if it was related to my account specifically or if it was related to the normal expected process for using this endpoint on all accounts.

Error Migrating Google Workspace to O365 - Calendar API Errors

I'm trying to build out a migration from Google Workspace into MS365. I've tried each of MS's recommended methods; Automatic, Manual, and PowerShell. For each one, I get the same error message
post-migration
uri=https://www.googleapis.com/calendar/v3/users/me/calendarList?maxResults=250 response={ "error": { "code": 403, "message": "Google Calendar API has not been used in project 206754733531 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project=206754733531 then retry.
If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"errors": [ { "message": "Google Calendar API has not been used in project 206754733531 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project=206754733531 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", "domain": "usageLimits", "reason": "accessNotConfigured", "extendedHelp": "https://console.developers.google.com" } ], "status": "PERMISSION_DENIED", "details": [ { "#type": "type.googleapis.com/google.rpc.Help", "links": [ { "description": "Google developers console API activation", "url": "https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project=206754733531" } ] }, { "#type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "SERVICE_DISABLED", "domain": "googleapis.com", "metadata": { "consumer": "projects/206754733531", "service": "calendar-json.googleapis.com" } } ] } } . --> The remote server returned an error: (403) Forbidden.
When I follow the link
https://console.developers.google.com/apis/api/calendar-json.googleapis.com/overview?project=206754733531**
I see the following screen
Relating to the PERMISSION_DENIED portion of the error, I have ensured that the ServiceAccount associated with the project has been added to the project and has the requisite permissions based on MS's documentation.
I really don't know what I'm doing incorrectly or where I'm going wrong. I'm incredibly new to all things programming and development so I apologize if this isn't nearly enough detail. I'm happy to provide more context/info as needed.
Google Calendar API has not been used in project 206754733531 before or it is disabled
Means that the Google calendar api has not been enabled in your app or its disabled.
Here are a few things to check in order of likelihood of causing your issue.
I would double check that you are in fact checking the correct project on google developer console for the service account credentials you are using. You may have downloaded a file for a different project and are checking the wrong one.
After that i would check the quota allotment you have for the google calendar api. Click the manage button in that link. If your quota is 0 then google has disabled your access for some reason. If they have check your email they should have told you why it was disabled.
SERVICE_DISABLED
If you have created the service account on google developer console logged in as a standard gmail user its not going to work. Service accounts only work with google calendar api with google workspace.
PERMISSION_DENIED
Make sure that you are creating this service account on the domain that you intended to access. Google calendar only works with service accounts from google workspace domain accounts with domain wide delegation setup. Great guide in setting up delegation Perform Google Workspace Domain-Wide Delegation of Authority just change the scopes to the google calendar scope you are using.

MS Teams: Invoking outgoing webhook from AdaptiveCard Actions

In Teams, I have setup outgoing webhooks to process messages with mentions to outgoing webhooks name.
Currently user is having to manually type in the mention to outgoing webhook (named OutgoingHookName) to post messages to it. I like to create an adapative card action in such a way that the outgoing webhook will be triggered when user performs the card action. I tried JSON as below, but the obviously incorrect/incomplete mention (<at>OutgoingHookName</at>) did not help.
Is it possible to trigger an outgoing webhook from with an adapative card action? If not, is there an alternative other than creating a full fledged messaging bot?
{
"type": "AdaptiveCard",
"version": "1.2",
"actions": [
{
"type": "Action.Submit",
"data": {
"msteams": {
"type": "imBack",
"value": "<at>OutgoingHookName</at> ID:1234"
}
},
"title": "Invoke Webhook"
}
]
}
Currently It's not possible to invoke an outgoing webhook from AdaptiveCard Actions and currently there is no work around for this. You must use #mention in compose message area for the webhook to receive message.
Microsoft will always focus on customer’s feedback and experience, some new features would be added to the services based on customers' feedback in the future, we also recommend you give your new idea in Teams UserVoice here if this needs to be consider as a future request.

Can you use slack buttons non-interactively?

While using Slack's block kit builder, I created a message that would send a notification as well as a link for the user to click on. I like the way the default button looks, but I get a warning whenever I click it saying my app isn't configured for interactivity.
The link does work, but the warning icon is unsettling. Is there a way to use these buttons without expecting interactivity? The alternative seems to be to just use a markdown link, but I don't think it looks as nice.
My block:
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Hello here's a notification"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<https://google.com|View Conversation>"
}
}
]
}
If I send this block straight from the block kit builder there's no warning message. I'm guessing this is because it gets sent as my user as opposed to an app.
As of now, there is no way to set up a block kit button without interactivity. i.e., when someone clicks on the button (with or without a URL), Slack sends a request to the preconfigured URL in your app config. The app needs to acknowledge this request and send an HTTP 200 OK response, in order for the button URL to work without the error sign.
You can read a rather detailed discussion on Slack's GitHub here.
A workaround, for now, would be to set up a webhook URL somewhere on the web (google cloud run could be a good free solution) which returns an acknowledge response. You can then alter your app's config to use this URL for app interactivity.
p.s. When you use block kit builder to send a preview message to Slack, it uses the same user token as the one used by Slack web app. The behavior you noted above can't be replicated when you use any other user token (received from an app's install flow).

Enable Google My Business API. Api calls failed

I tried to access GMB account list api with an access token having scope
https://www.googleapis.com/auth/business.manage
{
"error": {
"code": 403,
"message": "Google My Business API has not been used in project xxxxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/mybusiness.googleapis.com/overview?project=xxxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"#type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/mybusiness.googleapis.com/overview?project=xxxxx"
}
]
}
]
}
}
Whenever I tried to submit request from I got an email from GMB that
Your company already has a whitelisted project to access the Google My Business API. At this time, we are only whitelisting one project per business..
I checked, but there is no library with name Google My Business.
Current enabled Libraries are
Have you submitted the form to get access to the GMB API?
https://docs.google.com/forms/d/e/1FAIpQLSfC_FKSWzbSae_5rOpgwFeIUzXUF1JCQnlsZM_gC1I2UHjA3w/viewform
When you fill it, you have to precise the email addresses that Google will grant access to. Maybe someone else filled in for your company but didn't mention your email address.
In my case, when I received a confirmation email from the GMB team, I was able to see the GMB API when I searched for it in the console (see screenshot)
Then, all I had to do was to click to enable it.

Resources