Checkless is a tool for monitoring your websites via simple HTTP checks, but unlike paid for SaaS offerings, you can do it for free (probably). Checkless is built on top of serverless technologies like AWS Lambda, and an open source framework for managing code in environments such as Lambda called Serverless.
The good thing about serverless platforms such as AWS Lambda is they often have a free tier. This allows you to run quite a lot of code, for no cost. Once you go over the limit, it's likely you're not going to paying much either. For example, running 3 checks in 3 regions every 5 minutes can be as cheap as:
And that's without the free tier included, with the free tier you'll pay nothing. I started Checkless to monitor my own websites (it was called Lambda Overwatch then). And received some interest in how people could reuse it, Checkless is the result of simplifying the configuration/deployment of that system, as well as some other improvements, such as Multi-Region support.
If you need journey tests or anything fancy like that, look at your Pingdom's, etc. But for a simple check for "Up or not?" it's by far the cheapest way I've found to do it.
Just show me an example: If you'd like to see a working example, including automation, have a look at my site's checkless config.
First thing we need to do is install the pre-requisites, you'll need:
- NodeJS, version 8.10 or above
- The Serverless CLI tool, install it with npm via:
npm i -g serverless
- An AWS account and service account, with the correct permissions and a key
Note: Currently deployments are not working correctly on windows environments, it is recommended on using the Windows Subsystem for Linux (WSL) Bash to execute deployments if required. Though I'd really recommend using a free SaaS CI such as CircleCI or TravisCI.
Next, in your command line enter:
npm i -g checkless-cli. This will install the Checkless CLI. If you'd prefer to do it without the CLI, I'll be publishing a "Checkless from scratch" guide soon.
Once installed navigate to the directory where you will store your checkless configuration. I recommend keeping it in source control, such as GitHub, as it'll help you automate it and keep track of changes.
(If you already have a checkless.yml file, then you can skip this stage)
This will then take you through the stages of creating the initial configuration for your checks:
Once complete you will have a checkless.yml file in your directory. If you open the file you should see contents similar to:
region: eu-west-1 checks: tegud.net: url: https://www.tegud.net checkEvery: 5 minute regions: - eu-west-1 - us-east-1 notifications: - slack: webhookUrl: "https://myslackwebhook.com/ffdsfsdfgfdgrewasd"
You should update the webhookUrl to your own slack webhook, so that checkless can tell you whether the check was a success or not. In time more notifications will exist, but slack is a good way of showing it's working.
Before moving on, make sure you execute
So that checkless itself is installed.
Estimate the Cost
Once you've built your config you can check how much it will cost you. The estimate function of the CLI is very much that - an estimate. It's based on your checks being run at the rate specified for 30 days. So February will be cheaper, and months with 31 days will be more expensive.
This will provide you with an estimate for your configuration. It's likely it'll be good news, it'll all fit in the Free Tier. If you've already used up your free tier then you can specify:
checkless estimate --ignore-free-tier
To ignore the free tier, if there is a cost to be paid it'll break it down by region/function/memory.
Generate the Serverless config
Checkless leverages Serverless to handle deployment of the functions and other configuration. Serverless is a great way of managing your functions in AWS Lambda (and other serverless environments) on it's own, but it is quite verbose, the Checkless CLI is essentially a way of generating the Serverless config.
Within the directory with the checkless.yml configuration, execute:
This will generate the Serverless configuration and Checkless application assets per region within a .checkless folder. If you're managing in source control, add the folder to your `.gitignore' file to prevent it from being checked in. Once the configuration is generated, you can deploy checkless.
Within the same folder the .checkless folder was generated by the previous step (likely the same place as your checkless.yml) execute:
This will then execute a Serverless deploy in each region folder in sequence. This can take some time, and if any stage fails you may end up with some regions configured, but not all.
Once complete checkless should be configured in your AWS account. If the webhook is working right you should start to see:
Updates & More
To update your checks, simply update the config, and then execute:
checkless generate and then
And the checks will be updated.
To update or remove checkless itself or the CLI, check out the readme.
At this point we should have our checks running as per the configuration. But there's more that can be configured, including notification options, check frequency, check expectations and more. Explore more Checkless blog posts, or the Github Repositories for more.
Checkless Blog Posts
But wait, there's more! I've only changed the name, there will soon be more Checkless blog posts so you can find out more, or setup your own free site check. Check back soon for more.
- Checkless: Updating the Free Serverless Site Uptime Monitor - Brief history of Lambda Overwatch and what changed when it moved to Checkless
- More as they come...
Have a look at the checkless and checkless-cli repositories below if you want to jump straight to the code or getting started