From 90a0de17edf616fcfc150f9be6675983ff13c611 Mon Sep 17 00:00:00 2001 From: Roman Lomonosov Date: Fri, 9 Feb 2018 14:48:45 +0300 Subject: [PATCH] missed Prometheus stats --- carbon-clickhouse.go | 2 +- carbon/collector.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/carbon-clickhouse.go b/carbon-clickhouse.go index bc300b12..94feb6cf 100644 --- a/carbon-clickhouse.go +++ b/carbon-clickhouse.go @@ -20,7 +20,7 @@ import ( ) // Version of carbon-clickhouse -const Version = "0.7.0-alpha2" +const Version = "0.7.0-alpha3" func httpServe(addr string) (func(), error) { tcpAddr, err := net.ResolveTCPAddr("tcp", addr) diff --git a/carbon/collector.go b/carbon/collector.go index 18d7f502..116a660f 100644 --- a/carbon/collector.go +++ b/carbon/collector.go @@ -94,6 +94,10 @@ func NewCollector(app *App) *Collector { c.stats = append(c.stats, moduleCallback("udp", app.UDP)) } + if app.Prometheus != nil { + c.stats = append(c.stats, moduleCallback("prometheus", app.Prometheus)) + } + for n, u := range app.Uploaders { c.stats = append(c.stats, moduleCallback(fmt.Sprintf("upload.%s", n), u)) }