diff options
| -rw-r--r-- | main.go | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -16,10 +16,11 @@ import ( ) var ( - path string - httpPort int httpHost string + httpPort int + interval int namespace string + path string subsystem string gauges map[string]*prometheus.GaugeVec @@ -27,10 +28,11 @@ var ( func main() { // Set options - flag.StringVar(&path, "path", "", "The path to export metrics of") - flag.IntVar(&httpPort, "port", 9091, "The path to export metrics of") flag.StringVar(&httpHost, "host", "[::]", "The path to export metrics of") + flag.IntVar(&httpPort, "port", 9091, "The path to export metrics of") + flag.IntVar(&interval, "interval", 10, "The path to export metrics of") flag.StringVar(&namespace, "namespace", "fsdir_exporter", "Namespace to use for the Prometheus metrics") + flag.StringVar(&path, "path", "", "The path to export metrics of") flag.StringVar(&subsystem, "subsystem", "", "Subsystem to use for the Prometheus metrics") flag.Parse() @@ -136,7 +138,7 @@ func update() { } func updateLoop() { - for range time.Tick(time.Duration(10) * time.Second) { + for range time.Tick(time.Duration(interval) * time.Second) { update() } } |
