func main() { flag.Parse() if *doPrintVersion { printVersion() os.Exit(0) } shared.ParseEnabledGroups(*enabledGroupsFlag) fmt.Println("### Warning: the exporter is in beta/experimental state and field names are very\n### likely to change in the future and features may change or get removed!\n### See: https://github.com/Percona-Lab/prometheus_mongodb_exporter for updates") startWebServer() }
func Test_CollectServerStatus(t *testing.T) { shared.ParseEnabledGroups("assers,durability,backgrond_flushing,connections,extra_info,global_lock,index_counters,network,op_counters,memory,locks,metrics,cursors") collector := NewMongodbCollector(MongodbCollectorOpts{URI: "localhost"}) go collector.Collect(nil) }