We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

20
631.919,95

Cart

Quantity 1.800,00
Quantity 116,00

Learn how to – Monitor your website uptime and status using Upptime

Learn how to – Monitor your website uptime and status using Upptime.

Upptime is an opensource tool that can be used to monitor uptime and status of your website using GitHub Actions and GitHub pages. You don’t need to do any server configuration to set it up. You also don’t need to setup any agent on your website.

It is normally very important to know the status of your website and also to note what time it went down. This helps in troubleshooting and also saves money if your website is for business purposes.

This guide will discuss how to configure Upptime actions and pages to monitor status of your website.

With Upptime, you can get the following:

  1. Website monitoring at an interval of 5 minutes,
  2. Downtime notifications/alerts to your email or chat channels such as slack using webhooks.
  3. Status notifications if the website response code is anything different from 200.
  4. Custom status page that is sharable to a team for monitoring.

How to configure Upptime for monitoring

Let’s walk though how to configure Upptime. Follow the steps below:

Step 1 – Replicate Upptime repository

You have to replicate/fork Upptime official repository, which is a template repository. On Upptime’s Github repository, click on the “Use this template” button.

Give the repository a name and check the “Include all braches” option. In my case, I have named the repository as “web-uptime”

Step 2 – Configure Monitoring

There are a number of configurations that needs to be done on the cloned repository.

  • Add GH_PAT

Upptime needs to access this repository so that it can be able to check the status of the website every 5 minutes. Depending on the result, Upptime either opens an issue, sends an alert or commits the relevant information e.g status and response time.

We therefore need to provide access to this repository by providing a personal access token.

Go to your account settings then choose “Developer settings”

Account Settings
Developer options

In developer options, click on “Personal access tokens” then on “Generate new token”.

You will be asked to provide your GitHub credentials.

Give the token a name under “Note

In the “Select scopes” area, check “repo” and “workflow”. Then click “Generate token”

Copy the generated token to a safe place. Be notified that this key is only available once for copying.

We’ll then be required to add the generated token as a repository secret.

Head over to your cloned repository’s “Settings” then choose “Secrets”

Click on “New repository secret” to add the secret we created in the step above.

Name the new secret as GH_PAT and paste the copied token in the “Value” section. Then click “Add secret”

You should now see a repository secret added.

  • Configure the websites to monitor

The next step is to configure the website that Upptime will monitor using GitHub actions. The main configuration file is located in the root of the main branch. The file is .upptimerc.yml. We need to modify this file to have the details of the websites we intend to monitor.

Edit the .upptimerc.yml in the following manner:

  1. Change value of owner to your GitHub username
  2. change the repo value to the custom name of the repo you created. In my case, it is web-uptime.
  3. Add your websites under sites aray. Remember to remove the existing ones that come with the template.
  4. Add the cname of your website if you have it, otherwise remove the line.
  5. Uncomment the baseUrl line and change the value to your GitHub repository.

Then commit changes to master.

Wait for a few minutes for the actions to complete. You can check the progress in the Actions menu.

Upon completion, your website status should be visible at the “Live status”.

You will also be notified on email in case an issue has been raised by GitHub actions.

You can also view the graphs on the Upptime status page by clicking on the link under “About

Sample output:

That’s all you need to monitor your website with Upptime. Cheers!!

Check out these other interesting articles:

20
631.919,95

Cart

Quantity 1.800,00
Quantity 116,00