endlessh-go
endlessh-go copied to clipboard
add unix socket support for prometheus
this PR allows for listening on a Unix domain socket for prometheus metrics by prefixing the path with unix:
also open to alternative prefixes like unix/
(which is what caddy uses)
some of this approach can probably be reused for https://github.com/shizunge/endlessh-go/issues/112
example usage:
starting endlessh-go
./endlessh-go -alsologtostderr -enable_prometheus -prometheus_host unix:./coolmetricsocket.socket
getting metrics
curl -v --unix-socket ./coolmetricsocket.socket whateverhostnameyouwant/metrics