Open udhos opened 10 months ago
Hi!
Is there any publicly available code for easily exposing groupcache metrics for Prometheus?
I am sketching up the package below, but maybe I am reinventing the wheel here?!
Please advise!
// Usage example { metricsRoute := "/metrics" metricsPort := ":3000" log.Printf("starting metrics server at: %s %s", metricsPort, metricsRoute) mailgun := mailgun.New(cache) labels := map[string]string{ "app": appName, } namespace := "" collector := groupcache_exporter.NewExporter(namespace, labels, mailgun) prometheus.MustRegister(collector) go func() { http.Handle(metricsRoute, promhttp.Handler()) log.Fatal(http.ListenAndServe(metricsPort, nil)) }() }
Full details: https://github.com/udhos/groupcache_exporter
Hi!
Is there any publicly available code for easily exposing groupcache metrics for Prometheus?
I am sketching up the package below, but maybe I am reinventing the wheel here?!
Please advise!
Full details: https://github.com/udhos/groupcache_exporter