diff --git a/main.go b/main.go index 27b894c..8bb7376 100644 --- a/main.go +++ b/main.go @@ -84,6 +84,7 @@ func main() { flag.BoolVar(&LogDebug, "debug", false, "Enables debug logs (default: false)") flag.BoolVar(&ExportMetrics, "metrics", false, "Enables prometheus metrics exporting (default: false)") var showVersion = flag.Bool("version", false, "Display the version of minitor and exit") + var configPath = flag.String("config", "config.yml", "Alternate configuration path (default: config.yml)") flag.Parse() // Print version if flag is provided @@ -93,7 +94,7 @@ func main() { } // Load configuration - config, err := LoadConfig("config.yml") + config, err := LoadConfig(*configPath) if err != nil { log.Fatalf("Error loading config: %v", err) }