dashboard and -h fix

* add grafana dashboard
* test png
* print help when -h is present regardless of other flags
This commit is contained in:
T.v.Dein
2025-10-25 22:20:36 +02:00
committed by GitHub
parent b3e15c7b59
commit 662dc39e8f
2 changed files with 9 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ import (
) )
const ( const (
Version = `v0.0.7` Version = `v0.0.8`
SLEEP = 5 SLEEP = 5
Usage = `io-exporter [options] <file> Usage = `io-exporter [options] <file>
Options: Options:

View File

@@ -8,6 +8,10 @@ import (
"os" "os"
"strings" "strings"
// enable to debug with roumon
//_ "net/http/pprof"
// then: roumon -host=localhost -port=9187
"github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/promhttp"
) )
@@ -25,6 +29,10 @@ func Run() {
os.Exit(0) os.Exit(0)
} }
if conf.Showhelp {
fmt.Println(Usage)
os.Exit(0)
}
setLogger(os.Stdout, conf.Debug) setLogger(os.Stdout, conf.Debug)
metrics := NewMetrics(conf) metrics := NewMetrics(conf)