North-Seattle-College / ad440-winter2021-thursday-repo

NSC AD 440 Winter 2021 Thursday cohort practicum repo
Apache License 2.0
2 stars 27 forks source link

Create alerts for error 500 generated by the /users/{user_id}/task #208

Closed jinudean closed 3 years ago

jinudean commented 3 years ago

create alert

jinudean commented 3 years ago

review in class video "monitoring part"and Microsoft document with activity log https://docs.microsoft.com/en-us/azure/azure-monitor/logs/log-analytics-tutorial

jinudean commented 3 years ago

search Microsoft Document "Log alerts in Azure Monitor" and copy query

Screen Shot 2021-02-25 at 9 23 48 PM

jinudean commented 3 years ago

Start to create nw alert rule with my own result code == "500" with trashhold 30 in 5 mins

jinudean commented 3 years ago

TEST HttpTriggerAPIUserIdTask

Keep creating 500 Error but monitor tab shows success Screen Shot 2021-02-27 at 9 40 57 PM

jinudean commented 3 years ago

I got email notification from Azure and confirmed fired alert on Azure Screen Shot 2021-02-27 at 6 50 56 PM

Screen Shot 2021-02-27 at 9 47 11 PM

jinudean commented 3 years ago
Date Activity Time Spent
02/24/21 Created Issue for 500 error 30times in 5 min on git hub 15 min
02/25/21 Research Microsoft Document log Analytics tutorial 3 hrs
02/26/21 Review unattandent class 3 hrs
02/26/21 Research Query language of Kusto 4 hrs
02/27/21 created alert and test 3 hrs
jinudean commented 3 years ago

close issue

ahmadafrasiyab commented 3 years ago

Hi @jinudean it looks good to me and the email functionality is fine as well. I just have one suggestion as your query is checking the 500 code generally. We can narrow it down to this particular endpoint that you are testing and that way you will get an email only when your endpoint gives a 500 error and not when any of the four functions gives it. Feel free to check out my query to have an idea of what I am talking about. Rest looks good!