diff --git a/cmd/root.go b/cmd/root.go index 0017cba0..a67ad564 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -161,10 +161,9 @@ func initConfig() { viper.AddConfigPath("/etc/mongodb_query_exporter") // Search config in home directory with name ".mongodb_query_exporter" (without extension). viper.AddConfigPath(usr.HomeDir + "/.mongodb_query_exporter") - //config file name without extension - // viper.SetConfigName("config") } + viper.SetConfigType("yaml") if err := viper.ReadInConfig(); err != nil { panic(err) }