
The Worker service in Worker.cs is configured in Program.cs in the CleanArchitecture.Worker project.
#WEBSITE MONITOR SERVICE CODE#
If you don't want to bother cloning the code locally, you can just hit '.' while in the browser to open up GitHub's web editor (or click here), which provides a pretty nice in browser viewing experience. So, all you need to do to get 90% of the way there is grab my template from /ardalis/CleanArchitecture.WorkerService and make a few minor changes to it. NET Worker Service using Clean Architecture already has most of these features baked in, just as its placeholder functionality (that you would normally rip out and replace with your actual logic).
#WEBSITE MONITOR SERVICE FOR FREE#
If you want to emulate the other features UptimeRobot gives you for free above, you'd also want to repeat the check periodically, send notifications when status changes, and store results for each check (as well as check for keyword strings if you're going to support that).Īs it turns out, my solution template for creating a. If you just want to check whether a particular site is up, you can use the HttpClient class to make a request, and then just check that you received a success status code. Hope you find this useful!īut what if you just really want to write some code for this? Read on! Writing a Web Monitor Service in. So that's it! For the low price of FREE you can monitor up to 50 websites and get an email notification within 5 minutes of any outage (and, when the outage ends, another email saying it's back up).
#WEBSITE MONITOR SERVICE TV#
If you want to put the status of your team's sites up on a TV screen somewhere, there's built-in support for "TV Mode" even on the free plan: Within a few minutes, you should see the status of the monitor. The interval needs to be at least 5 minutes for the free plan.Īfter saving the monitor, it should show up in your list on your dashboard. You need to provide a nickname for the monitor, a URL to check, a string to check for, and adjust the interval. Or at least some known good part of it.Įach monitor can also notify one or more team members by email when it's down or comes back up.Īssuming you chose a keyword monitor, you'll get an expanded form with additional options.

I don't just want to know the server responded with some success code, I want to know that the actual content of the page came back. Since I'm mostly using this to check websites, I use the keyword option. You create an account and then set up your first monitor. I have no business relationship with them I'm just a happy user. They also offer paid plans which include more monitors, SSL features, team dashboards, and more. The service is free for up to 50 monitors assuming you're OK with a 5 minute interval between checks. I've been using UptimeRobot for a long time - probably around 10 years or so. My current favorite solution for this is UptimeRobot. While there are built-in ways of performing health checks in ASP.NET Core, I really wanted a solution that required less code and worked for an arbitrary number of sites, and would simply notify me when the site was unavailable, and again when it came back online. NET applications, some are static websites, and some are managed by third party CMS tools. These are hosted in various locations and run on a variety of web stacks.

I run a number of sites, including this site, DevIQ, DevBetter, and NimblePros. Of course, with just a little bit of code you can easily write your own small application that can periodically check the status of one or more sites and alert you to a problem. One tool I've been using for a long time is a site called Uptime Robot. If you have your own web sites or apps that you maintain, it's helpful to know when they're not working.
