DEV: Support env var for prometheus port in cache_critical_dns

This commit is contained in:
Neil Lalonde 2020-08-17 15:48:05 -04:00
parent 5b2c306bb8
commit 530058918e
No known key found for this signature in database
GPG Key ID: FF871CA9037D0A91

View File

@ -58,7 +58,7 @@ end
def send_counter(name, description, labels, value)
host = "localhost"
port = 9405
port = ENV.fetch("DISCOURSE_PROMETHEUS_COLLECTOR_PORT", 9405).to_i
if labels
labels = labels.map do |k, v|