diff --git a/prometheus.go b/prometheus.go index be1cf0c5..0161e5aa 100644 --- a/prometheus.go +++ b/prometheus.go @@ -20,6 +20,10 @@ var ( ) func initPrometheus() { + if len(conf.PrometheusBind) == 0 { + return + } + prometheusRequestsTotal = prometheus.NewCounter(prometheus.CounterOpts{ Name: "requests_total", Help: "A counter of the total number of HTTP requests imgproxy processed.",