From 23a43fa4eb500295ab31b869bf480f16fdb2d336 Mon Sep 17 00:00:00 2001 From: Sylvia van Os Date: Fri, 27 Dec 2019 15:47:07 +0100 Subject: [PATCH] Append underscore to envPrefix Fixes parsing env vars Before, it wasn't actually reading env vars like MAXSCALE_EXPORTER_ADDRESS as described in the documentation but env vars like MAXSCALE_EXPORTERADDRESS instead. This fixes that. --- maxscale_exporter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maxscale_exporter.go b/maxscale_exporter.go index ae3ebb4..c5b864f 100644 --- a/maxscale_exporter.go +++ b/maxscale_exporter.go @@ -17,7 +17,7 @@ import ( ) const ( - envPrefix = "MAXSCALE_EXPORTER" + envPrefix = "MAXSCALE_EXPORTER_" metricsPath = "/metrics" namespace = "maxscale" )