Revert "Add chart URL tool"
Fix handling of absolute staticDir paths
Add chart URL tool
chartsrv is a dead-simple web application which runs Prometheus queries and
charts the result as an SVG. You make a dashboard by putting a lot of these
images into a web page. You make it refresh by adding
<meta id="refresh" http-equiv="refresh" content="5">
to the header. Ta-da!
This is a live graph from metrics.sr.ht
$ go build -o chartsrv main.go
$ ./chartsrv https://prometheus.example.org
Listening on :8142
Forward /chart.svg
to this address with your favorite reverse proxy. If you
want to listen to some other port, pass a second argument like :1337
.
Create a URL like https://chartsrv.example.org/chart.svg?query=...&args...
and
set the query parameters as appropriate:
{{.instance}}