A Simple HTTP health checker for golang

patsch

Permanently Assert Target Succeeds Check Health

use cases

  • used by kubernetes cluster admins to quickly identify faulty ingresses
  • used by kubernetes cluster admins to monitor zero-downtimeness and DNS changes during cluster blue/green deployments

installation

download from Releases and extract into your $PATH

screenshot

cluster switch: from old loadbalancer (127.0.0.151 127.0.0.220 127.0.0.251) to new one (127.0.0.169 127.0.0.210 127.0.0.234)

$ patsch \
    https://example.com/api/public/myapp-user/health \
    https://api.example.com/api/public/myapp-backend/health \
    https://api.example.com/api/public/db/health \
    https://example.com \
    https://api.example.com/api/public/emyapp/health \
    https://api.example.com/api/public/myapp-backend/health \
    https://api.example.com/api/public/myapp-auth/health

✅  0.88s  200 OK                https://example.com/                                      [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.88s  200 OK                https://api.example.com/api/public/myapp-backend/health  [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.97s  200 OK                https://api.example.com/api/public/redis/health           [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.97s  200 OK                https://api.example.com/api/public/db/health              [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.97s  200 OK                https://example.com                                       [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.97s  200 OK                https://api.example.com/api/public/myapp-auth/health     [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.97s  200 OK                https://api.example.com/api/public/emyapp/health         [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  1.04s  200 OK                https://api.example.com/api/public/myapp-user/health     [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.44s  200 OK                https://example.com                                       [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.44s  200 OK                https://example.com/                                      [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.58s  200 OK                https://api.example.com/api/public/emyapp/health         [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  0.61s  200 OK                https://api.example.com/api/public/myapp-user/health     [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  0.63s  200 OK                https://api.example.com/api/public/myapp-auth/health     [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  0.63s  200 OK                https://api.example.com/api/public/myapp-backend/health  [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  0.82s  200 OK                https://api.example.com/api/public/redis/health           [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  0.82s  200 OK                https://api.example.com/api/public/db/health              [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  0.69s  200 OK                https://example.com                                       [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.69s  200 OK                https://example.com/                                      [127.0.0.151 127.0.0.220 127.0.0.251] 
✅  0.94s  200 OK                https://api.example.com/api/public/myapp-user/health     [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  0.94s  200 OK                https://api.example.com/api/public/emyapp/health         [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  0.94s  200 OK                https://api.example.com/api/public/db/health              [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  1.14s  200 OK                https://api.example.com/api/public/myapp-auth/health     [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  1.24s  200 OK                https://api.example.com/api/public/redis/health           [127.0.0.169 127.0.0.210 127.0.0.234] 
✅  1.24s  200 OK                https://api.example.com/api/public/myapp-backend/health  [127.0.0.169 127.0.0.210 127.0.0.234]

usage

patsch https://google.ie "https://auth.example.com" "https://httpbin.org/status/418" "https://httpbin.org/status/511"

synopsis

Gets http status of URL(s) and prints an error, if the status is not okay
Usage: patsch [OPTION]... URL [URL]...
  -a    (EXPERIMENTAL!) auto mode, finds and checks all ingress rules in current kubernetes cluster
  -f    fail mode, exit with an error, if any request fails
  -kubeconfig string
        (optional) absolute path to the kubeconfig file (default "/home/pschu/.kube/config")
  -n int
        interval <secs> (default 2)
  -o    single mode, only check once
  -q    quiet mode, does not print successful requests
Similar Resources

HTTP service to generate PDF from Json requests

pdfgen HTTP service to generate PDF from Json requests Install and run The recommended method is to use the docker container by mounting your template

Dec 2, 2022

A Go based HTTP Botnet

A Go based HTTP Botnet

Second interation of GoBot, https://github.com/SaturnsVoid/GoBot2 GoBot GoBot is a project i am working on as i learn Go. GoBot is a PoC(Proof of Conc

Nov 24, 2022

An HTTP service for customizing import path of your Go packages.

Go Packages A self-host HTTP service that allow customizing your Go package import paths. Features Reports. Badges. I18N. Preview I launch up a free H

Nov 27, 2022

Http web frame with Go Programming Language

Http web frame with Go Programming Language

Oct 17, 2021

An in-memory, key-value store HTTP API service

This is an in-memory key-value store HTTP API service, with the following endpoints: /get/{key} : GET method. Returns the value of a previously set ke

May 23, 2022

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Jan 1, 2023

http-theft-bank-LiujJian created by GitHub Classroom

http-theft-bank-start-template 木犀银行抢劫游戏模版 hope this can help you http-theft-bank-start-template To begin with Tips 附录 http URL http 工作流程 http 协议方法 HTT

Dec 2, 2021

Apple Push Notification (APN) Provider library for Go 1.6 and HTTP/2.

Apple Push Notification (APN) Provider library for Go 1.6 and HTTP/2. Send remote notifications to iOS, macOS, tvOS and watchOS. Buford can also sign push packages for Safari notifications and Wallet passes.

Dec 6, 2021

Protocol Buffers to HTTP client code generator/converter

Proto2http Proto2http provides a code generation tool to convert your protocol buffers (.proto) files into invokable HTTP request. Usage proto2http -p

Oct 23, 2022
Comments
  • Provide Homebrew tap

    Provide Homebrew tap

    Hello! This is a nifty tool, thanks for sharing. It would be awesome if you could provide a Homebrew package, to ease installation for Mac/linux machines. Since this is a Go project, the Goreleaser can make this quite easy. There is also a matching GitHub Action for it. Let me know, if I can help with that.

    Greetings from the DB Systel ;)

Related tags
An simple, easily extensible and concurrent health-check library for Go services
An simple, easily extensible and concurrent health-check library for Go services

Healthcheck A simple and extensible RESTful Healthcheck API implementation for Go services. Health provides an http.Handlefunc for use as a healthchec

Dec 30, 2022
Track health of various dependencies - golang

Background This package helps setup health check based on status of external dependencies. The idea is to add all external dependencies like database,

Dec 17, 2021
⛑ Gatus - Automated service health dashboard
⛑ Gatus - Automated service health dashboard

A service health dashboard in Go that is meant to be used as a docker image with a custom configuration file. I personally deploy it in my Kubernetes

Dec 31, 2022
An easy to use, extensible health check library for Go applications.

Try browsing the code on Sourcegraph! Go Health Check An easy to use, extensible health check library for Go applications. Table of Contents Example M

Dec 30, 2022
Render health ECG (electrocardiogram) animation
Render health ECG (electrocardiogram) animation

HealthECG Render health ECG (electrocardiogram) animation About This program shows how the health ECG animation was implemented in the original Reside

Jan 6, 2022
Vocabular checker JetBrains Academy home work Read file with bad words

Vocabulary Checker JetBrains Academy home work Read file with bad words and replace them on * in the next entered text until exitVocabulary Checker JetBrains Academy home work Read file with bad words and replace them on * in the next entered text until exit

Jan 14, 2022
A Simple Bank Web Service implemented in Go, HTTP & GRPC, PostgreSQL, Docker, Kubernetes, GitHub Actions CI

simple-bank Based on this Backend Master Class by TECH SCHOOL: https://youtube.com/playlist?list=PLy_6D98if3ULEtXtNSY_2qN21VCKgoQAE Requirements Insta

Dec 9, 2021
Gore - Simple HTTP client for Go

GoRe (Go Requester) Simple HTTP client for Go Example g := gore.New( gore.With

Jan 21, 2022
bf.go - A dead simple brainfuck interpreter Slow and simple

bf.go - A dead simple brainfuck interpreter Slow and simple. Can execute pretty much all tested Brainfuck scripts. Installation If you have Go install

Oct 15, 2021
go-simple-geo is a library for simple geo calculations.

go-simple-geo is a library for simple geo calculations. Installation go get github.com/EpicStep/go-simple-geo Example package main import ( "github.

Dec 4, 2022