Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

add new mt-replicator tool #645

Merged
merged 5 commits into from
Jun 30, 2017
Merged

add new mt-replicator tool #645

merged 5 commits into from
Jun 30, 2017

Conversation

woodsaj
Copy link
Member

@woodsaj woodsaj commented May 30, 2017

When replicating between clusters in different networks it is not
always easy to push from one kafka to another due to Kafka
requiring that publishers send to the configured "advertised_addr"
which probably isnt internet facing. This new tool consumes from
a local kafka cluster and publishes data to a remote tsdb-gw server.

@woodsaj woodsaj requested review from Dieterbe and replay May 30, 2017 08:42
Copy link
Contributor

@Dieterbe Dieterbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. few minor changes. I wonder if we could refactor this util and mt-replicator to give it output plugins (kafka and tsdb) but we don't have to spend time on that now.

return
}

func (r *MetricsReplicator) Start() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would reorder the code. after the constructor put Start, then Stop, then consume and flush (make the latter two non-exported), the order seems pretty arbitrary now, I think it's generally a good idea to put the main calleable logic first and helper functions below them


var (
producerBatchSize = flag.Int("batch-size", 10000, "number of metrics to send in each batch.")
destinationUrl = flag.String("destination-url", "http://localhost/metrics", "tsdb-gw address to send metrics to")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when i run gometalinter I see:

metrics.go:23:2:warning: var destinationUrl should be destinationURL (golint)
metrics.go:27:2:warning: var clientId should be clientID (golint)

see https://github.com/golang/go/wiki/CodeReviewComments#initialisms

woodsaj added 3 commits June 30, 2017 05:35
When replicating between clusters in different networks it is not
always easy to push from one kafka to another due to Kafka
requiring that publishers send to the configured "advertised_addr"
which probably isnt internet facing.  This new tool consumes from
a local kafka cluster and publishes data to a remote tsdb-gw server.
@woodsaj
Copy link
Member Author

woodsaj commented Jun 29, 2017

@Dieterbe can we get this merged now

@woodsaj woodsaj merged commit cf93a64 into master Jun 30, 2017
@Dieterbe Dieterbe deleted the mt-replicator-via-tsdb branch September 18, 2018 09:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants