From 580aeb48a199248869a83bf2e837b9d27575f379 Mon Sep 17 00:00:00 2001 From: Jusitn Gallardo Date: Wed, 25 Jul 2018 00:30:24 -0700 Subject: [PATCH] Add environment variable support. --- burrow-exporter.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/burrow-exporter.go b/burrow-exporter.go index d3089c3..1e60d67 100644 --- a/burrow-exporter.go +++ b/burrow-exporter.go @@ -24,27 +24,33 @@ func main() { cli.StringFlag{ Name: "burrow-addr", Usage: "Address that burrow is listening on", + EnvVar: "BURROW_ADDR", }, cli.StringFlag{ Name: "metrics-addr", Usage: "Address to run prometheus on", + EnvVar: "METRICS_ADDR", }, cli.IntFlag{ Name: "interval", Usage: "The interval(seconds) specifies how often to scrape burrow.", + EnvVar: "INTERVAL", }, cli.IntFlag{ Name: "api-version", Usage: "Burrow API version to leverage", Value: 2, + EnvVar: "API_VERSION", }, cli.BoolFlag{ Name: "skip-partition-status", Usage: "Skip exporting the per-partition status", + EnvVar: "SKIP_PARTITION_STATUS", }, cli.BoolFlag{ Name: "skip-group-status", Usage: "Skip exporting the per-group status", + EnvVar: "SKIP_GROUP_STATUS", }, }