From 662dc39e8fdfe0a8a94c41fd706fc7949339c104 Mon Sep 17 00:00:00 2001 From: "T.v.Dein" Date: Sat, 25 Oct 2025 22:20:36 +0200 Subject: [PATCH] dashboard and -h fix * add grafana dashboard * test png * print help when -h is present regardless of other flags --- cmd/config.go | 2 +- cmd/root.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/config.go b/cmd/config.go index 1fc4686..5ef6cd5 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -15,7 +15,7 @@ import ( ) const ( - Version = `v0.0.7` + Version = `v0.0.8` SLEEP = 5 Usage = `io-exporter [options] Options: diff --git a/cmd/root.go b/cmd/root.go index e28d355..e801051 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -8,6 +8,10 @@ import ( "os" "strings" + // enable to debug with roumon + //_ "net/http/pprof" + // then: roumon -host=localhost -port=9187 + "github.com/prometheus/client_golang/prometheus/promhttp" ) @@ -25,6 +29,10 @@ func Run() { os.Exit(0) } + if conf.Showhelp { + fmt.Println(Usage) + os.Exit(0) + } setLogger(os.Stdout, conf.Debug) metrics := NewMetrics(conf)