Skip to content

Commit

Permalink
Merge pull request #59 from manolama/tweaks
Browse files Browse the repository at this point in the history
Add an `agg_uri` override to allow passing in a custom URI for publis…
  • Loading branch information
manolama authored Oct 17, 2022
2 parents b2ebf05 + 2066bf5 commit 00539ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/spectatord_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ ABSL_FLAG(PortNumber, statsd_port, PortNumber(8125),
ABSL_FLAG(bool, enable_socket, true, "Enable UNIX domain socket support.");
ABSL_FLAG(std::string, socket_path, "/run/spectatord/spectatord.unix",
"Path to the UNIX domain socket.");
ABSL_FLAG(std::string, uri, "",
"Optional override URI for the aggregator.");
ABSL_FLAG(absl::Duration, meter_ttl, absl::Minutes(15),
"Meter TTL: expire meters after this period of inactivity.");
ABSL_FLAG(size_t, age_gauge_limit, 1000,
Expand Down Expand Up @@ -80,9 +82,12 @@ auto main(int argc, char** argv) -> int {

auto cfg = GetSpectatorConfig();

auto maybe_agg_uri = absl::GetFlag(FLAGS_uri);
if (absl::GetFlag(FLAGS_debug)) {
cfg->uri =
"http://atlas-aggr-dev.us-east-1.ieptest.netflix.net/api/v4/update";
} else if (!maybe_agg_uri.empty()) {
cfg->uri = std::move(maybe_agg_uri);
}

if (absl::GetFlag(FLAGS_verbose_http)) {
Expand Down

0 comments on commit 00539ad

Please sign in to comment.