Forum Discussion
Monitoring URL links
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
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?
- hspintoJul 17, 2020
Microsoft
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
- Arslan11Jul 15, 2020Brass Contributor
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 https://docs.microsoft.com/en-us/dotnet/api/microsoft.applicationinsights.telemetryclient.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.