Categorygithub.com/DazWilkin/updown-webhook
repository
0.0.0-20241210045836-51bed6b450ee
Repository: https://github.com/dazwilkin/updown-webhook.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

Golang implementation of a Webhook for updown.io

build Go Report Card

Events

Name
check.down
check.up
check.ssl_invalid
check.ssl_valid
check.ssl_expiration
check.ssl_renewed
check.performance_drop

Test

# Local
WHOOK="8888"

curl \
--request POST \
--header "Content-Type: application/json" \
-d @"samples/check.down.json" \
http://localhost:${WHOOK}

Tailscale Serve

WHOOK="8888"
PROXY="10000"

# Available only within tailnet
tailscale serve https:${PROXY} / http://localhost:${WHOOK}

HOST="..."
TAILNET="...ts.net"

curl \
--request POST \
--header "Content-Type: application/json" \
-d @"samples/check.down.json" \
https://${HOST}.${TAILNET}:${PROXY}

Tailscale Funnel

WHOOK="8888"
PROXY="10000"

tailscale serve https:${PROXY} / http://localhost:${WHOOK}

# Available publicly (e.g. by Updown service)
tailscale funnel ${PROXY} on

HOST="..."
TAILNET="...ts.net"

curl \
--request POST \
--header "Content-Type: application/json" \
-d @"samples/check.down.json" \
https://${HOST}.${TAILNET}:${PROXY}

Updown Webhook tester

Add the Webhook to settings (console|API)

https://updown.io/recipients/test

Prometheus

Metrics are prefixed updown_

NameTypeDescription
build_infoCounterA metrc with constant value '1'
handler_totalCounter
handler_failuresCounter

Sigstore

updown-webhook container images are being signed by Sigstore and may be verified:

cosign verify \
--key=./cosign.pub \
ghcr.io/dazwilkin/updown-webhook:1234567890123456789012345678901234567890

NOTE cosign.pub may be downloaded here

To install cosign, e.g.:

go install github.com/sigstore/cosign/cmd/cosign@latest


Buy Me A Coffee