pshealthz
is a tool to check the health of a process.
$ pshealthz
other terminal:
$ curl -i http://localhost:8080 -d '{"regex":"^/usr/sbin/chronyd"}'
HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 15 Nov 2023 09:38:24 GMT
Content-Length: 74
{"ok":true,"processes":[{"pid":"10","cmdline":"/usr/sbin/chronyd -F -1"}]}
VERSION=v0.0.1
# download
curl -fLROSs https://github.com/kunitsucom/pshealthz/releases/download/${VERSION}/pshealthz_${VERSION}_linux_amd64.zip
# unzip
unzip -j pshealthz_${VERSION}_linux_amd64.zip '*/pshealthz'
go install github.com/kunitsucom/pshealthz/cmd/pshealthz@latest
$ pshealthz --help
Usage:
pshealthz [options]
Description:
check process health via http
options:
--version (default: false)
show version information and exit
--addr (env: PSHEALTHZ_ADDR, default: localhost:8888)
listen address for http server
--help (default: false)
show usage