Crates.io | healthcheck-rs |
lib.rs | healthcheck-rs |
version | 0.1.2 |
source | src |
created_at | 2020-07-09 19:02:50.614002 |
updated_at | 2022-06-22 19:16:51.039413 |
description | A Rust executable for simple HTTP check status. |
homepage | https://github.com/selatotal/healthcheck-rs |
repository | https://github.com/selatotal/healthcheck-rs |
max_upload_size | |
id | 262960 |
size | 33,868 |
A Rust executable for simple HTTP check status.
healthcheck-rs use a config file containing URLs and check if the return of HTTP GET request of each one is successfully
Create a config.json file with the following specification:
{
"groups": [
{
"name": "GOOGLE SERVICES",
"hosts": [
{
"name": "Google Search",
"url": "https://www.google.com"
},
{
"name": "Google Drive",
"url": "https://drive.google.com"
}
]
},
{
"name": "FACEBOOK SERVICES",
"hosts": [
{
"name": "Facebook",
"url": "https://facebook.com"
},
{
"name": "Instagram",
"url": "https://instagram.com"
}
]
}
]
}
Install using:
cargo install healthcheck-rs
To run, you can use the binary generated in target/ folder or use (it will use config.json file in the same folder):
healthcheck-rs
You can pass config.json file in command-line using:
healthcheck-rs new-config-file.json
healthcheck-rs will do a HTTP GET request in each service and return an output like this:
===== GOOGLE SERVICES =====
Google Search - ✅
Google Drive - ✅
===== FACEBOOK SERVICES =====
Facebook - ❌ - reqwest::Error { kind: Request, url: "https://facebook.com", source: TimedOut }
Instagram - ✅
This project use the following crates: