Jun 04 2020
09:05 AM
- last edited on
Apr 08 2022
10:28 AM
by
TechCommunityAP
Jun 04 2020
09:05 AM
- last edited on
Apr 08 2022
10:28 AM
by
TechCommunityAP
Is there any way , where we can monitor a URL link on azure monitor, if it goes down.
I have specified URL link at the bottom.
What's the best apparch with regards to this, having it in a Kusto query language in place or any other way.
Jun 05 2020 06:16 AM
the easiest way is to set up an Availability Test in an Application Insights instance:
https://docs.microsoft.com/en-us/azure/azure-monitor/app/monitor-web-app-availability
If you need to monitor the endpoint from a VM, you can also use Connection Monitor:
https://docs.microsoft.com/en-us/azure/network-watcher/connection-monitor-preview
You can then create Azure Monitor alerts based on the results of any of the approaches above.
Jun 06 2020 03:21 AM
@hspintoThanks for the response, I will update this post, if I will struggle with this.
Jun 07 2020 08:58 AM
@hspintoI had a look at the article, I would like to clarify one thing, the article is mentioning this
Create a URL ping test
To create your first availability request, open the Availability pane and select Create Test.
Once, I will create the availability test for the specified website, under application insights, will I get an alert via email, if the HTTP is unavailable for the specified website.
Jun 08 2020 02:50 AM
as I mentioned earlier, after creating the Availability Test, you'll have to set up the alert to execute the required action, e.g., sending you an e-mail.
Once the test is created, you can use the context menu to configure the alert rule.
In the alert configuration blade, you'll have to create an action group to send you an e-mail whenever the alert fires/resolves. More details here.
Jun 08 2020 06:48 AM
@hspintoone more question, to ask you, can I add multiple websites under one available test or I need to create individual available test for individual websites.
Jun 08 2020 10:00 AM
@Arslan11, you will have a ping test per URL (you can't have multiple URLs in a single ping test). However, if the multiple URLs you are testing are part of a specific application flow you want to validate, ensuring the full flow is responding correctly, then you should consider multi-step web tests instead. Multi-step web tests are more expensive. See pricing here.
Jul 01 2020 10:09 AM
Yes you can use availability test in your case to monitor the any url "xyz.com"
Go to Application insights and select Availability test from panel.
Jul 09 2020 01:39 AM
@Srini1987 I did , that but I am afraid it didn't work.
I added a website to availability test
The website url link is not being monitored, the website was not loading today and I didn't got analert.
I did create an alert, to send any an email to the team, if HTTP is not responding.
Email didn't got send.
Jul 09 2020 01:40 AM
I did , that but I am afraid it didn't work.
I added a website to availability test
The website url link is not being monitored, the website was not loading today and I didn't got analert.
I did create an alert, to send any an email to the team, if HTTP is not responding.
Email didn't got send.
Jul 09 2020 02:05 PM - edited Jul 09 2020 02:08 PM
@hspintoI have attaches screenshots to this post, please have a look
Screenshots attached includes Availability test, alert and action group.
Please review it and let me know, where I am going wrong.
And who is the best person to ask guidance on mars backup question
Jul 10 2020 06:13 AM
maybe the alert had already fired before having e-mail notification set up and never resolved. Can you check if you have active alerts in the Azure Monitor alerts view? Change the time range filter to a larger period if needed.
Can you also change the URL being monitored to a valid one, wait for a "resolved" notification and then switch back to the failing URL to check if a "fired" notification is now coming?
Jul 15 2020 07:59 AM
@hspinto The reason for this not work is because my website is internal facing.
I found a alternative, any guidance on this, how can I get a example code to make a start on mine one
Write your own code to periodically test your internal server. Run the code as a background process on a test server behind your firewall. Your test process can send its results to Application Insights by using TrackAvailability() API in the core SDK package. This requires your test server to have outgoing access to the Application Insights ingestion endpoint, but that is a much smaller security risk than the alternative of permitting incoming requests. The results will appear in the availability web tests blades though the experience will be slightly simplified from what is available for tests created via the portal.
Jul 17 2020 06:08 AM
I thought the URL you were using was just a dummy one 😄 But this does not explain why the alerts were not firing, because they should fire no matter the URL being used.
Regarding the sample you're asking, you have this one, which is meant to run as an Azure Function, but you can reuse the code and put it in your application.
https://docs.microsoft.com/en-us/azure/azure-monitor/app/availability-azure-functions