HTTP/HTTPS endpoint healthcheck.
Project description
Checking Health
CLI para execução de healthcheck em múltiplos endpoints HTTP/HTTPS, com saída rica, colorida e orientada a diagnóstico.
✨ Features
-
✅ Execução sequencial com feedback em tempo real
-
🌐 Suporte a múltiplos endpoints via arquivo
-
🎯 Identificação do tipo de endpoint (
TYPE) baseada na URL -
📊 Métricas detalhadas por requisição:
- Status (OK / FAIL)
- Código HTTP
- Domain
- IP
- Content-Type
- Tamanho do download
- Tempo de resposta (
REQ) - Tempo total (
TIME) - Title (quando HTML)
-
🎨 Saída colorida (verde/vermelho)
-
📈 Resumo final com métricas agregadas
-
🧪 Testável com
pytest
📦 Instalação
Instale diretamente do PyPI:
pip install checking-health
🔗 Projeto no PyPI: https://pypi.org/project/checking-health
▶️ Uso
checking-health endpoints.txt --timeout 3
📄 Formato do arquivo de entrada
Arquivo .txt com uma URL por linha:
https://google.com/health
https://api.exemplo.com/status
api.interna.local/metrics
Regras:
- Linhas vazias são ignoradas
- Linhas iniciadas com
#são ignoradas - URLs sem esquema recebem
https://automaticamente
📊 Exemplo de saída
TYPE STATUS HTTP DOMAIN IP CONTENT-TYPE SIZE REQ(ms) TIME(ms) TITLE
---------------------------------------------------------------------------------------------------------------------------
healthcheck OK 200 google.com.br 142.250.0.1 text/html 14.2KB 23 41 Google
status OK 200 api.exemplo.com 10.0.0.1 application/json 512B 18 19 -
metrics FAIL - api.interna.local - - 0B 10 10 -
🧠 Conceitos importantes
TYPE
Último segmento da URL:
| URL | TYPE |
|---|---|
/healthcheck |
healthcheck |
/healthcheck/status |
status |
/ |
root |
REQ(ms)
Tempo até o servidor responder (latência).
TIME(ms)
Tempo total da requisição, incluindo download do conteúdo.
SIZE
Tamanho real baixado (body da resposta).
TITLE
Extraído do HTML (<title>), quando disponível.
📈 Resumo final
Resumo
------------------------------
Total : 3
Success : 2
Failure : 1
REQ average : 17ms
TIME average : 23ms
🧪 Testes
Instale pytest:
pip install pytest
Execute:
pytest -q
🔍 Casos de uso
- Monitoramento rápido de APIs
- Diagnóstico de latência
- Verificação de ambientes (dev/sandbox/alpha/beta/prod)
- Debug de problemas DNS / rede / conteúdo
⚠️ Limitações
- Não separa tempo de DNS / TCP / TLS (tempo agregado)
- Download completo do body pode impactar performance em respostas grandes
- Execução sequencial (sem paralelismo)
🔮 Possíveis melhorias
- Execução paralela (threads/async)
- Retry automático
- Exportação para CSV/JSON
- Limite de download (
--max-size) - Breakdown detalhado de latência (DNS, TLS, TTFB)
- Agrupamento por TYPE
👤 Author
André Argôlo CTO • Software Architect • DevOps
- 🌐 Website: https://argolo.dev
- 🐙 GitHub: https://github.com/argolo
📜 Licença
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file checking_health-0.0.1.tar.gz.
File metadata
- Download URL: checking_health-0.0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85aa6c6f27cace37419ab82e223eb480827467ba557c208e15c8333c60830604
|
|
| MD5 |
efb37d96a3117c6de5434078347ecc1b
|
|
| BLAKE2b-256 |
6205461fdcd8f868b5c5c0b1acfa00929a68671ccb91e9d0bdfc30ca7b7c30c6
|
Provenance
The following attestation bundles were made for checking_health-0.0.1.tar.gz:
Publisher:
release.yml on argolo/checking-health
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
checking_health-0.0.1.tar.gz -
Subject digest:
85aa6c6f27cace37419ab82e223eb480827467ba557c208e15c8333c60830604 - Sigstore transparency entry: 1298393700
- Sigstore integration time:
-
Permalink:
argolo/checking-health@43f34ce62fd890ede9397abd72e187d8e2dd000a -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/argolo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@43f34ce62fd890ede9397abd72e187d8e2dd000a -
Trigger Event:
push
-
Statement type:
File details
Details for the file checking_health-0.0.1-py3-none-any.whl.
File metadata
- Download URL: checking_health-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a14f1237df4f04e29777c49341ad175f6ee87bb3d20c0094e1905b134a75dbf
|
|
| MD5 |
ec96c99b7ed6ad363fcc6703b727a00a
|
|
| BLAKE2b-256 |
35aa13b8b7e2f3dfcc14329d38ff8c80cd1e15b96925f1c0c6ee4b27a2bea8a5
|
Provenance
The following attestation bundles were made for checking_health-0.0.1-py3-none-any.whl:
Publisher:
release.yml on argolo/checking-health
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
checking_health-0.0.1-py3-none-any.whl -
Subject digest:
7a14f1237df4f04e29777c49341ad175f6ee87bb3d20c0094e1905b134a75dbf - Sigstore transparency entry: 1298393806
- Sigstore integration time:
-
Permalink:
argolo/checking-health@43f34ce62fd890ede9397abd72e187d8e2dd000a -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/argolo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@43f34ce62fd890ede9397abd72e187d8e2dd000a -
Trigger Event:
push
-
Statement type: