func main() {
	flag.Parse()
	shared.LoadGroupsDesc()
	shared.ParseEnabledGroups(*enabledGroupsFlag)

	mongodbCollector := collector.NewMongodbCollector(collector.MongodbCollectorOpts{
		URI: *mongodbUriFlag,
	})
	prometheus.MustRegister(mongodbCollector)

	startWebServer()
}
示例#2
0
func TestMain(m *testing.M) {
	shared.LoadGroupsDesc()
	os.Exit(m.Run())
}