Add support for prometheus

This commit is contained in:
9seconds
2018-10-17 12:06:46 +03:00
parent 5f00363da5
commit 9346c11f37
7 changed files with 126 additions and 2 deletions
+7 -1
View File
@@ -110,6 +110,12 @@ var (
Envar("MTG_STATSD_TAGS").
StringMap()
prometheusPrefix = app.Flag("prometheus-prefix",
"Which namespace to use to send stats to Prometheus.").
Envar("MTG_PROMETHEUS_PREFIX").
Default("mtg").
String()
writeBufferSize = app.Flag("write-buffer",
"Write buffer size in bytes. You can think about it as a buffer from client to Telegram.").
Short('w').
@@ -151,7 +157,7 @@ func main() { // nolint: gocyclo
*bindIP, *publicIPv4, *publicIPv6, *statsIP,
*bindPort, *publicIPv4Port, *publicIPv6Port, *statsPort, *statsdPort,
*statsdIP, *statsdNetwork, *statsdPrefix, *statsdTagsFormat,
*statsdTags, *secureOnly,
*statsdTags, *prometheusPrefix, *secureOnly,
*secret, *adtag,
)
if err != nil {