prometheus-upsc-exporter

rather basic upsc prometheus exporter
git clone https://git.e1e0.net/prometheus-upsc-exporter.git
Log | Files | Refs | README | LICENSE

commit 7f98e5291a9758412497166290b79a1ea58a99fc
parent 82e9c70a155d1be5e360239c6d1cbfa42d923a8d
Author: Paco Esteban <paco@e1e0.net>
Date:   Fri, 17 Jan 2020 15:05:50 +0100

fix hang child processes

Diffstat:
MMakefile | 2+-
Mmain.go | 1+
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -1,6 +1,6 @@ BINARY=upsc-exporter -VERSION=v0.1.0 +VERSION=v0.1.1 BUILD=`git rev-parse --short HEAD` OS=`uname | tr "[:upper:]" "[:lower:]"` ARCH="amd64" diff --git a/main.go b/main.go @@ -76,6 +76,7 @@ func getMetrics(w http.ResponseWriter, r *http.Request) { for _, m := range metrics { fmt.Fprintf(w, "upsc_%s %.2f\n", strings.ReplaceAll(m.name, ".", "_"), m.value) } + cmd.Wait() // needed to close the pipe and release the child process } func main() {