From 19c8a5124a295b7c61b672e7287f0756b03f4338 Mon Sep 17 00:00:00 2001 From: Krishna Ravishankar Date: Wed, 27 Sep 2023 13:07:31 -0400 Subject: [PATCH 1/3] Add a parameter to feed broker storage query --- cmd/metricsfetcher/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/metricsfetcher/main.go b/cmd/metricsfetcher/main.go index b92af10b..a91c81cc 100644 --- a/cmd/metricsfetcher/main.go +++ b/cmd/metricsfetcher/main.go @@ -51,6 +51,7 @@ func init() { flag.BoolVar(&config.Verbose, "verbose", false, "Verbose output") flag.BoolVar(&config.DryRun, "dry-run", false, "Dry run mode (don't reach Zookeeper)") flag.BoolVar(&config.Compression, "compression", true, "Whether to compress metrics data written to ZooKeeper") + brq := flag.String("broker-storage-raw-query", "", "A complete broker free storage query string to use") envy.Parse("METRICSFETCHER") flag.Parse() @@ -61,7 +62,12 @@ func init() { } // Complete query string. - config.BrokerQuery = fmt.Sprintf("%s by {%s}.rollup(avg, %d)", *bq, config.BrokerIDTag, config.Span) + if *brq == "" { + config.BrokerQuery = fmt.Sprintf("%s by {%s}.rollup(avg, %d)", *bq, config.BrokerIDTag, config.Span) + } else { + config.BrokerQuery = *brq + } + config.PartnQuery = fmt.Sprintf("%s.rollup(avg, %d)", *pq, config.Span) } From adae769f9e24a1bbf5b01e67652fd281885e53cd Mon Sep 17 00:00:00 2001 From: Krishna Ravishankar Date: Fri, 29 Sep 2023 13:30:42 -0400 Subject: [PATCH 2/3] Testing --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c77ca06..6a331d69 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 ubuntu:22.04 as base +FROM --platform=linux/amd64 ubuntu:20.04 as base # Install pre-reqs ARG DEBIAN_FRONTEND=noninteractive @@ -70,7 +70,7 @@ RUN apt clean COPY entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] -FROM registry.ddbuild.io/images/base/gbi-ubuntu_2204 as dd-image +FROM registry.ddbuild.io/images/base/gbi-ubuntu_2004 as dd-image COPY --from=base /entrypoint.sh / COPY --from=base /go/src /go/src From 2cfb2b770291facb908bd25fc8e870adeb27943b Mon Sep 17 00:00:00 2001 From: Krishna Ravishankar Date: Fri, 29 Sep 2023 13:58:49 -0400 Subject: [PATCH 3/3] Hack to update metricsfetcher version from kafka-kit --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6a331d69..7c77ca06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 ubuntu:20.04 as base +FROM --platform=linux/amd64 ubuntu:22.04 as base # Install pre-reqs ARG DEBIAN_FRONTEND=noninteractive @@ -70,7 +70,7 @@ RUN apt clean COPY entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] -FROM registry.ddbuild.io/images/base/gbi-ubuntu_2004 as dd-image +FROM registry.ddbuild.io/images/base/gbi-ubuntu_2204 as dd-image COPY --from=base /entrypoint.sh / COPY --from=base /go/src /go/src