Upptime is an open source tool that can be used to monitor the uptime and status of the website using GitHub Actions and GitHub pages. You can set it up without any server configuration. You also don’t need to set up any proxy on the website.
In general, it is often important to understand the status of your website and record when it was closed. If your website is used for commercial purposes, this will help troubleshoot and save money.
This guide will discuss how to configure Upptime operations and pages to monitor the status of your website.
Using Upptime, you can get the following information:
- The website monitoring interval is 5 minutes,
- Downtime notifications/alerts for email or chat channels, such as free time using webhooks.
- If the website response code is different from 200, a status notification will be issued.
- A custom status page that can be shared with the team for monitoring.
How to configure Upptime for monitoring
Let’s take a look at how to configure Upptime. Please follow the steps below:
Step 1-Copy the Upptime repository
You must copy/fork the official Upptime repository, which is the template repository.in Upptime’s Github repository, Click “Use this template“Button.
Name the repository and check “Include all branches” Options. In my case, I named the repository “web-uptime”
Step 2-Configure monitoring
Many configurations need to be done on the cloned repository.
- Add GH_PAT
Upptime needs to access this repository so that it can check the website status every 5 minutes. Based on the results, Upptime can open issues, send alerts or submit related information, such as status and response time.
Therefore, we need to provide access to this repository by providing a personal access token.
Go to your account settings and select “Developer Settings”Account settingsDeveloper options
In the developer options, click “Personal Access Token” then “Generate a new token”.
You will be asked to provide GitHub credentials.
inside “Select Range” Area, check “Repurchase” and “Workflow”. Then click “Generate Token”
Copy the generated token to a safe place.Received notification, the key is Can only be used once copy.
Then, we will need to add the generated token as a repository key.
Go to the “Settings” of the cloned repository and select “Secrets”
Click”New repository secret” Add the secret we created in the steps above.
Name the new secret GH_PAT And paste the copied token into the “Value” section. Then click “Add Secret”
You should now see the repository password added.
- Configure the website for monitoring
The next step is to use GitHub actions to configure the websites that Upptime will monitor. The main configuration file is located in the root directory of the main branch.The file is
.upptimerc.yml. We need to modify this file to get the details of the website we intend to monitor.
.upptimerc.yml In the following way:
- Change value
ownerTo your GitHub username
repoThe value is the custom name of the repository you created.In my case
- Add your website below
sitesWell, remember to delete the existing template that came with the template.
- Add to
cnameIf you own a website, delete this line.
- Uncomment the baseUrl line and change its value to your GitHub repository.
Then submit the changes to the master.
Wait a few minutes to complete the operation. You can check the progress in the “Actions” menu.
When finished, your website status should be displayed in “Real-time Status”.
If GitHub actions cause problems, you will also receive email notifications.
You can also click “on“
This is what you need to monitor websites with Upptime. Cheers! !
Check out the following other interesting articles:
10 best open source Linux monitoring tools
How to install Zabbix server on CentOS 8 / RHEL 8