Skip to content

Dinesh-Bhogadi/SRE_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP Endpoint Health Checker

This program checks the health of a set of HTTP endpoints at regular intervals and calculates the availability percentage for each domain.

Prerequisites

  • Python 3.x
  • requests library (pip install requests)
  • PyYAML library (pip install pyyaml)

Usage

  1. Create a YAML configuration file with a list of HTTP endpoints to monitor. Each endpoint should include the following information:

    • name: A name to describe the HTTP endpoint.
    • url: The URL of the HTTP endpoint.
    • method (optional): The HTTP method of the endpoint (default is GET).
    • headers (optional): The HTTP headers to include in the request.
    • body (optional): The HTTP body to include in the request. See the provided "sample_config.yaml" file for an example.
  2. Run the program by executing the following command: python healthchecker.py

  3. The program will start checking the health of the endpoints every 15 seconds. It will log the availability percentage for each domain after each cycle.

  4. Press CTRL+C to stop the program.

  5. image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages