Step-by-Step Guide: How to Use Websentry GitHub Action

Ritik Chourasiya
3 min readOct 31, 2023

--

Welcome to Websentry, a powerful GitHub Action that simplifies website health monitoring.

With Websentry, you can effortlessly check the availability of your websites and receive real-time reports on their status.

Whether you’re a website owner, developer, or part of an operations team, Websentry provides a reliable solution for ensuring your online presence remains uninterrupted.

Let’s get started with a step-by-step guide on how to use Websentry to monitor the health of your websites.

Prerequisites

Before we dive into the setup, make sure you have the following prerequisites in place:

  1. GitHub Repository: You’ll need a GitHub repository where you want to monitor website health.
  2. Basic Knowledge of GitHub Actions: Familiarity with GitHub Actions will be helpful as we’ll be setting up the workflow there.

Installation

We’ll start by creating a GitHub Actions workflow that uses Websentry. Follow these steps:

1. Access Your GitHub Repository: Open your GitHub repository where you want to set up website health monitoring with Websentry.

2. Create a Workflow File: Inside your repository, navigate to the .github/workflows directory. If it doesn't exist, you can create it. Create a new YAML file for your Websentry workflow, for example, health_check.yml.

3. Edit the Workflow File: Open the health_check.yml file for editing and add the following content:

name: Website Health Check

on:
schedule:
- cron: '0 * * * *' # Run every hour

jobs:
website-health-check:
runs-on: ubuntu-latest
name: Website Health Check
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.16' # Use the Go version you need
- name: Websentry Action
uses: theritikchoure/websentry@main
with:
website-url: 'example.com,example2.com' # Set the website URLs you want to check
max-retries: '10'
retry-interval: '5s'
request-timeout: '10s'

In this YAML file, we have defined the schedule for running the workflow (every hour in this example). You can customize the schedule according to your needs.

Make sure to replace 'example.com,example2.com' with the website URLs you want to monitor. You can also adjust the max-retries, retry-interval, and request-timeout values as needed.

4. Commit Changes: Save the changes to the health_check.yml file and commit them to your GitHub repository.

Usage

With the Websentry GitHub Action set up in your repository, it will continuously monitor the health of the specified websites and provide instant status reports.

Configuration

You can customize Websentry by specifying the following input parameters in your GitHub Actions workflow:

  • website-url: The URLs of the websites you want to monitor.
  • max-retries: The maximum number of retries for checking the websites’ health.
  • retry-interval: The time interval between retry attempts.
  • request-timeout: The timeout for HTTP requests.

Monitoring Reports

Websentry provides detailed monitoring reports for each website you track. These reports include:

  • Availability Status: Instant updates on whether the website is up or down.
  • Response Time: Measured time taken to receive a response.
  • Content Length: Size of the retrieved content.
  • Redirect URL: Details on any URL redirections.
  • Server Information: Information about the web server.
  • Content Type: Type of content returned by the server.
  • SSL Status: Indication of whether SSL is enabled.

Conclusion

By following these steps, you’ve set up Websentry to monitor the health of your specified websites, ensuring that your online presence remains uninterrupted.

Websentry will run at the scheduled intervals and provide you with instant status reports, helping you quickly identify and address any issues.

Remember to regularly review the monitoring reports to ensure the continuous health of your websites and online services.

I hope that Websentry proves to be a valuable tool for maintaining the reliability of your online presence.

Links —

Websentry Github Action — WebSentry Action · Actions · GitHub Marketplace

Github Repo — Websentry at Github by Ritik Chourasiya

Author — Ritik Chourasiya (Github) (Linkedin)

--

--

Ritik Chourasiya

I’m a 22 year old, still undergraduate backend developer based in India, with 2 years of experience in the software development industry.